Fix failed user lookup
The kiosk is fucked, fix it later
This commit is contained in:
parent
55be2a898b
commit
5e304826ca
1 changed files with 11 additions and 8 deletions
|
@ -135,6 +135,7 @@ def kiosk():
|
|||
|
||||
@app.route('/kiosk/data', methods=['GET'])
|
||||
def kiosk_data():
|
||||
global after_date
|
||||
swipes = db.session.query(Swipe).filter(Swipe.time >= after_date)
|
||||
|
||||
counts = {}
|
||||
|
@ -157,11 +158,13 @@ def kiosk_data():
|
|||
tz = timezone('EST')
|
||||
est = dt.astimezone(tz)
|
||||
|
||||
user = db.session.query(User).filter(User.uuid == swipe.uuid).first()
|
||||
|
||||
time_here = datetime.now() - dt
|
||||
time_here_str = f'{time_here.seconds//3600}:{(time_here.seconds//60)%60:02d}'
|
||||
|
||||
print(swipe.uuid)
|
||||
user = db.session.query(User).filter(User.uuid == swipe.uuid).first()
|
||||
|
||||
if user:
|
||||
rec = {
|
||||
'first_name': user.first_name,
|
||||
'last_name': user.last_name,
|
||||
|
|
Loading…
Reference in a new issue