"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

View File

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