Skip to content

Commit 8630a5c

Browse files
committed
fix server waypoint coordinates
1 parent 4229b74 commit 8630a5c

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

mslib/msui/flighttrack.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ def __init__(self, lat=0., lon=0., flightlevel=0., location="", comments=""):
147147
self.lat = lat
148148
self.lon = lon
149149

150-
# Only resolve location name if coordinates are not provided
151-
if (lat == 0.0 and lon == 0.0) and location:
150+
# Only resolve location name if coordinates are truly missing
151+
if (lat is None or lon is None) and location:
152152
locations = config_loader(dataset='locations')
153153
if location in locations:
154154
self.lat, self.lon = locations[location]
@@ -225,11 +225,6 @@ def __init__(self, name="", filename=None, waypoints=None, mscolab_mode=False,
225225
if waypoints:
226226
self.replace_waypoints(waypoints)
227227

228-
if self.revision is None:
229-
self.revision = Revision(
230-
revision_id=int(datetime.datetime.utcnow().timestamp()),
231-
name=None
232-
)
233228

234229
def load_settings(self):
235230
"""
@@ -723,11 +718,7 @@ def load_from_xml_data(self, xml_content, name="Flight track"):
723718
revision_name = rev_el.getAttribute("name") or None
724719
self.revision = Revision(revision_id, revision_name)
725720
else:
726-
# Backward compatibility
727-
self.revision = Revision(
728-
revision_id=int(datetime.datetime.utcnow().timestamp()),
729-
name=None
730-
)
721+
self.revision = None
731722

732723
# Validate only waypoint structure, revision is optional metadata
733724
_waypoints_list = load_from_xml_data(xml_content, name)

0 commit comments

Comments
 (0)