1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-20 19:07:38 +03:00

inara: Fix 'fleet' type

This commit is contained in:
Athanasius 2021-04-06 14:38:07 +01:00
parent 3ea6dac00b
commit 7ef6c17fa1

View File

@ -747,8 +747,8 @@ def journal_entry( # noqa: C901, CCR001
# Fleet
if event_name == 'StoredShips':
fleet = sorted(
[{
fleet: List[OrderedDictT[str, Any]] = sorted(
[OrderedDict({
'shipType': x['ShipType'],
'shipGameID': x['ShipID'],
'shipName': x.get('Name'),
@ -756,15 +756,15 @@ def journal_entry( # noqa: C901, CCR001
'starsystemName': entry['StarSystem'],
'stationName': entry['StationName'],
'marketID': entry['MarketID'],
} for x in entry['ShipsHere']] +
[{
}) for x in entry['ShipsHere']] +
[OrderedDict({
'shipType': x['ShipType'],
'shipGameID': x['ShipID'],
'shipName': x.get('Name'),
'isHot': x['Hot'],
'starsystemName': x.get('StarSystem'), # Not present for ships in transit
'marketID': x.get('ShipMarketID'), # "
} for x in entry['ShipsRemote']],
}) for x in entry['ShipsRemote']],
key=itemgetter('shipGameID')
)