1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-05-30 15:19:40 +03:00

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 2022-08-13 18:43:19 +01:00 committed by GitHub
commit 86e148ddb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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':