add necessary flush

master
Aevann 2023-08-20 06:03:07 +03:00
parent e1eecfc0f2
commit a6469085b3
1 changed files with 1 additions and 0 deletions

View File

@ -201,6 +201,7 @@ def group_reject(v, group_name, user_id):
g.db.delete(membership)
g.db.flush()
count = g.db.query(GroupMembership).filter_by(group_name=group.name).count()
if not count:
g.db.commit() #need it to fix "Dependency rule tried to blank-out primary key column 'group_memberships.group_name' on instance"