"BUGFIX: No double staff update"

This commit is contained in:
Doug Le Tough 2018-03-06 02:05:20 +01:00
parent 83063d67b3
commit 4ff620e51a
1 changed files with 12 additions and 12 deletions

View File

@ -509,18 +509,18 @@ def save_staff_slot(turn_id, slot_id, user_id):
slot = Tetawebapp_staffs(user_id=user_id,
turn_id=turn_id,
slot_num=slot_id)
try:
db.session.add(slot)
commit = db.session.commit()
except Exception as e:
db.session.rollback()
print "[+] Error at save_staff_slot:"
print "------------------------------"
print "%s" % e.message
print "------------------------------"
return False
if commit != None:
return False
try:
db.session.add(slot)
commit = db.session.commit()
except Exception as e:
db.session.rollback()
print "[+] Error at save_staff_slot:"
print "------------------------------"
print "%s" % e.message
print "------------------------------"
return False
if commit != None:
return False
return True
def get_roles():