minor fix logout

This commit is contained in:
Wilson Gomez 2023-07-25 09:41:58 -05:00
parent b2489508a3
commit f209fbc461
2 changed files with 4 additions and 4 deletions

View File

@ -113,7 +113,7 @@ class FrontWindow(QMainWindow):
response = dialog.exec_()
if response == DIALOG_REPLY_YES:
# self.check_empty_sale() This function cancels sale if it has not number
logout({'context': self.ctx})
logout(self.ctx)
if self.active_weighing and self.reader_thread:
self.reader_thread.onClose()
super(FrontWindow, self).close()

View File

@ -46,11 +46,11 @@ def logout(ctx):
else:
conn = HTTPSConnection(host, port=port, context=context_http)
url = '/' + db + '/logout'
payload = json.dumps(
{
payload = json.dumps({'context': {
'session':ctx.get('session'),
'login': ctx.get('login')
},
}}
,
default=encoder)
conn.request('POST', url, body=payload, headers=HEADERS)
response = conn.getresponse()