1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 08:40:34 +03:00

eddn: journal: Add SystemAddress cross-check to StarSystem augmentation

This commit is contained in:
Athanasius 2022-05-29 15:36:42 +01:00
parent 4fcd2ae3f3
commit 9fd3c3852a
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -1712,6 +1712,10 @@ def journal_entry( # noqa: C901, CCR001
# add mandatory StarSystem and StarPos properties to events
if 'StarSystem' not in entry:
if this.systemaddress is None or this.systemaddress != entry['SystemAddress']:
logger.warning("event has no StarSystem, but SystemAddress isn't current location")
return "Wrong System! Delayed Scan event?"
if not system:
logger.warning("system is falsey, can't add StarSystem")
return "system is falsey, can't add StarSystem"