File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 2525LOGOUT_MAC = args .out_MAC
2626
2727to_seat_id = 0
28- if (len (table_macs_to_seats .search (Query ().mac == LOGIN_MAC )) > 0 ):
29- to_seat_id = table_macs_to_seats .search (Query ().mac == LOGIN_MAC )[0 ]['seat' ]
28+ if LOGIN_MAC :
29+ if (len (table_macs_to_seats .search (Query ().mac == LOGIN_MAC )) > 0 ):
30+ to_seat_id = table_macs_to_seats .search (Query ().mac == LOGIN_MAC )[0 ]['seat' ]
3031
3132from_seat_id = 0
32- if (len (table_macs_to_seats .search (Query ().mac == LOGOUT_MAC )) > 0 ):
33- from_seat_id = table_macs_to_seats .search (Query ().mac == LOGOUT_MAC )[0 ]['seat' ]
33+ if LOGOUT_MAC :
34+ if (len (table_macs_to_seats .search (Query ().mac == LOGOUT_MAC )) > 0 ):
35+ from_seat_id = table_macs_to_seats .search (Query ().mac == LOGOUT_MAC )[0 ]['seat' ]
3436
3537move_body = {'employee_id' : EMPLOYEE_EMAIL .split ('@' , 1 )[0 ],
3638 'move_time' : str (datetime .datetime .now ().replace (microsecond = 0 )),
5557
5658response = requests .put (conf .URL_BASE + conf .URL_MOVES + '/' + str (move_id ) + '/complete' , headers = conf .HEADERS )
5759
58- print (str (response .status_code ) + ': ' + response .reason )
60+ print (str (response .status_code ) + ': ' + response .reason )
You can’t perform that action at this time.
0 commit comments