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

Merge pull request #962 from EDCD/fix/961/lagged-scan-bad-starpos

EDDN: Only add missing StarPos if for current system
This commit is contained in:
Athanasius 2021-04-01 11:30:24 +01:00 committed by GitHub
commit 6196a17dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -714,6 +714,12 @@ def journal_entry( # noqa: C901
logger.warning("this.coordinates is None, can't add StarPos")
return "this.coordinates is None, can't add StarPos"
# Gazelle[TD] reported seeing a lagged Scan event with incorrect
# augmented StarPos: <https://github.com/EDCD/EDMarketConnector/issues/961>
if this.systemaddress is None or this.systemaddress != entry['SystemAddress']:
logger.warning("event has no StarPos, but SystemAddress isn't current location")
return "Wrong System! Delayed Scan event?"
entry['StarPos'] = list(this.coordinates)
if 'SystemAddress' not in entry: