Merge pull request #1639 from EDCD/fix/1638/inara-approachsettlement-no-marketid

inara: ApproachSettlement: Only set marketID if present in event
This commit is contained in:
Athanasius authored and GitHub committed 2022-08-13 18:43:19 +01:00
commit 86e148ddb0
1 file changed
+4 -1
+4 -1
View File
@@ -669,10 +669,13 @@ def journal_entry( # noqa: C901, CCR001
to_send = {
'starsystemName': system,
'stationName': entry['Name'],
'marketID': entry['MarketID'],
'starsystemBodyName': entry['BodyName'],
'starsystemBodyCoords': [entry['Latitude'], entry['Longitude']]
}
# Not present on, e.g. Ancient Ruins
if (market_id := entry.get('MarketID')) is not None:
to_send['marketID'] = market_id
new_add_event('setCommanderTravelLocation', entry['timestamp'], to_send)
elif event_name == 'FSDJump':