1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-05-31 15:49:41 +03:00

eddn: codexentry: Ody Update 12 will add BodyID

* So add a check to see if the event already has it, and leave it if so.
* And might as well have a check on BodyName in case that gets added as well.
This commit is contained in:
Athanasius 2022-06-01 16:24:51 +01:00
parent 020aa325a7
commit 1349b2bca1
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -976,7 +976,12 @@ class EDDN:
f' "{this.status_body_name}" ({type(this.status_body_name)})')
else:
# In case Frontier add it in
if entry.get('BodyName', None) is None:
entry['BodyName'] = this.status_body_name
# Frontier are adding this in Odyssey Update 12
if entry.get('BodyID', None) is None:
# Only set BodyID if journal BodyName matches the Status.json one.
# This avoids binary body issues.
if this.status_body_name == this.body_name: