mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-05-30 07:09:39 +03:00
eddn: Be paranoid about this.status_body_name type and value
As it was we'd blindly set codexentry['BodyName'] from it if not None.
This commit is contained in:
parent
4fa64eec40
commit
2bf70aae14
@ -943,7 +943,11 @@ class EDDN:
|
||||
entry = ret
|
||||
|
||||
# Set BodyName if it's available from Status.json
|
||||
if this.status_body_name is not None:
|
||||
if this.status_body_name is None or not isinstance(this.status_body_name, str):
|
||||
logger.warning(f'this.status_body_name was not set properly:'
|
||||
f' "{this.status_body_name}" ({type(this.status_body_name)})')
|
||||
|
||||
else:
|
||||
entry['BodyName'] = this.status_body_name
|
||||
# Only set BodyID if journal BodyName matches the Status.json one.
|
||||
# This avoids binary body issues.
|
||||
|
Loading…
x
Reference in New Issue
Block a user