mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-21 11:27:38 +03:00
Check consistency of station between API and Journal
Fixes 204
This commit is contained in:
parent
f95e00b0c3
commit
6a04e67451
@ -428,7 +428,11 @@ class AppWindow:
|
||||
self.status['text'] = _("What are you flying?!") # Shouldn't happen
|
||||
elif monitor.cmdr and data['commander']['name'] != monitor.cmdr:
|
||||
raise companion.CmdrError() # Companion API return doesn't match Journal
|
||||
elif (auto_update and not data['commander'].get('docked')) or (monitor.system and data['lastSystem']['name'] != monitor.system) or (monitor.state['ShipID'] and data['ship']['id'] != monitor.state['ShipID']) or (monitor.state['ShipType'] and data['ship']['name'].lower() != monitor.state['ShipType']):
|
||||
elif ((auto_update and not data['commander'].get('docked')) or
|
||||
(monitor.system and data['lastSystem']['name'] != monitor.system) or
|
||||
(monitor.station and data['lastStarport']['name'] != monitor.station) or
|
||||
(monitor.state['ShipID'] and data['ship']['id'] != monitor.state['ShipID']) or
|
||||
(monitor.state['ShipType'] and data['ship']['name'].lower() != monitor.state['ShipType'])):
|
||||
raise companion.ServerLagging()
|
||||
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user