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

eddn: Use if '<key>' not in <dict>: idiom.

This commit is contained in:
Athanasius 2022-06-04 14:55:27 +01:00
parent 1349b2bca1
commit 62c8af4dc0
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

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