"BUGFIX: No double staff update"
This commit is contained in:
parent
83063d67b3
commit
4ff620e51a
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue