minor fix logout
This commit is contained in:
parent
b2489508a3
commit
f209fbc461
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue