From eb7eda7eee5812ae9cb919c2a633e53403fcea25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gru=CC=88ndger?= Date: Sat, 16 Dec 2017 15:59:41 +0100 Subject: [PATCH] Fixed broken logbook test --- ogn/collect/logbook.py | 5 +++-- ogn/model/device.py | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ogn/collect/logbook.py b/ogn/collect/logbook.py index b086459..c5f29b8 100644 --- a/ogn/collect/logbook.py +++ b/ogn/collect/logbook.py @@ -112,7 +112,8 @@ def update_logbook(session=None): and_(Logbook.takeoff_airport_id == null(), Logbook.landing_airport_id == union_query.c.landing_airport_id, Logbook.landing_timestamp == union_query.c.landing_timestamp)))) \ - .values({"takeoff_timestamp": union_query.c.takeoff_timestamp, + .values({"reftime": union_query.c.reftime, + "takeoff_timestamp": union_query.c.takeoff_timestamp, "takeoff_track": union_query.c.takeoff_track, "takeoff_airport_id": union_query.c.takeoff_airport_id, "landing_timestamp": union_query.c.landing_timestamp, @@ -152,7 +153,7 @@ def update_logbook(session=None): session.commit() logger.debug("New logbook entries: {}".format(insert_counter)) - return "Logbook entries: {} inserted, {} updated".format(update_counter, insert_counter) + return "Logbook entries: {} inserted, {} updated".format(insert_counter, update_counter) @app.task diff --git a/ogn/model/device.py b/ogn/model/device.py index 1724437..797e5e0 100644 --- a/ogn/model/device.py +++ b/ogn/model/device.py @@ -16,8 +16,6 @@ class Device(Base): software_version = Column(Float) hardware_version = Column(SmallInteger) real_address = Column(String(6)) - firstseen = Column(DateTime, index=True) - lastseen = Column(DateTime, index=True) # Relations aircraft_beacons = relationship('AircraftBeacon')