"BUGFIX: Un staffer ne peut pas selectionner plusieurs créneaux du même tour"
This commit is contained in:
parent
fe10a9320e
commit
d7ed7007e4
@ -545,6 +545,8 @@ def drop_staff_slot(turn_id, slot_num, user_id):
|
||||
def save_staff_slot(turn_id, slot_id, user_id):
|
||||
""" Save staff given slot """
|
||||
slot = Tetawebapp_staffs.query.filter(Tetawebapp_staffs.turn_id==turn_id, Tetawebapp_staffs.slot_num==slot_id).count()
|
||||
if slot == 0:
|
||||
slot = Tetawebapp_staffs.query.filter(Tetawebapp_staffs.turn_id==turn_id, Tetawebapp_staffs.user_id==user_id).count()
|
||||
if slot == 0:
|
||||
slot = Tetawebapp_staffs(user_id=user_id,
|
||||
turn_id=turn_id,
|
||||
|
@ -62,7 +62,7 @@ function save_turn() {
|
||||
|
||||
function update_sheet(obj, turn, slot) {
|
||||
var url = '/staffsheet/update/'+turn+'/'+slot;
|
||||
get_html_from_ajax(obj, url);
|
||||
get_html_from_ajax(obj, url)
|
||||
obj.onclick=function (){ return clear_sheet(obj, turn, slot);}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user