Cleanup the dev startup logic a bit
This commit is contained in:
parent
8f937d040a
commit
27dca66a0f
|
@ -65,6 +65,7 @@ def main(page: ft.Page):
|
|||
handler = app.get_batch_handler('pos')
|
||||
session = app.make_session()
|
||||
user = session.get(model.User, page.shared['user_uuid'])
|
||||
if user:
|
||||
# TODO: should also filter this by terminal
|
||||
batch = handler.get_current_batch(user, create=False)
|
||||
if batch:
|
||||
|
@ -76,7 +77,19 @@ def main(page: ft.Page):
|
|||
page.shared['cust_display'] = str(value or '') or None
|
||||
else:
|
||||
page.shared['cust_display'] = None
|
||||
else:
|
||||
page.shared['txn_display'] = None
|
||||
page.shared['cust_uuid'] = None
|
||||
page.shared['cust_display'] = None
|
||||
else:
|
||||
page.shared['user_uuid'] = None
|
||||
page.shared['user_display'] = None
|
||||
page.shared['txn_display'] = None
|
||||
page.shared['cust_uuid'] = None
|
||||
page.shared['cust_display'] = None
|
||||
session.close()
|
||||
else:
|
||||
page.shared['user_display'] = None
|
||||
|
||||
def clean_exit():
|
||||
if not config.production():
|
||||
|
|
Loading…
Reference in a new issue