Update 'brewman/views/auth/user.py'

dbsession was incorrectly spelt in add_groups
This commit is contained in:
Amritanshu Agrawal 2017-10-10 06:21:05 +00:00
parent a2fbebca07
commit aeead4db76

View File

@ -136,7 +136,7 @@ class UserView(object):
ug = [g for g in user.groups if g.id == id] ug = [g for g in user.groups if g.id == id]
ug = None if len(ug) == 0 else ug[0] ug = None if len(ug) == 0 else ug[0]
if group['Enabled'] and ug is None: if group['Enabled'] and ug is None:
group_object = self.request.dbsessioin.query(Group).filter(Group.id == id).one() group_object = self.request.dbsession.query(Group).filter(Group.id == id).one()
user.groups.append(group_object) user.groups.append(group_object)
elif not group['Enabled'] and ug: elif not group['Enabled'] and ug:
user.groups.remove(ug) user.groups.remove(ug)