mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-16 02:42:40 +03:00
Workaround for inconsistent ships data
This commit is contained in:
1 parent
0cb2fa80f0
commit
4fa8ace8f0
1 file changed
+1
-1
@@ -149,7 +149,7 @@ def ships(data):
|
||||
ships = companion.listify(data.get('ships'))
|
||||
current = data['commander'].get('currentShipId')
|
||||
|
||||
if isinstance(current, int) and ships[current]:
|
||||
if isinstance(current, int) and current < len(ships) and ships[current]:
|
||||
ships.insert(0, ships.pop(current)) # Put current ship first
|
||||
|
||||
if not data['commander'].get('docked'):
|
||||
|
||||
Reference in new issue
Block a user