test

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
if 'tid' in request.params.keys() and request.params['tid']:
__tag = Session.query(Tag).filter(Tag.id==int(request.params['tid'])).first()
if __tag and not __tag.children and not HasRootMenuItem(__tag.menuitems):
g.rsPool = {}
__tag.goods = []
for mi in __tag.menuitems:
RemoveMenuBranch(mi)
#__tag.menuitems = []
Session.delete(__tag)
Session.commit()