From b87510b9b7c57399c3fda894041e6e65e942c4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gru=CC=88ndger?= Date: Tue, 12 Dec 2017 21:45:19 +0100 Subject: [PATCH] Use status == 1 for 'used for takeoff-landing-detection' instead of 0 --- ogn/collect/logbook.py | 2 +- ogn/collect/takeoff_landing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ogn/collect/logbook.py b/ogn/collect/logbook.py index caf493b..bd85778 100644 --- a/ogn/collect/logbook.py +++ b/ogn/collect/logbook.py @@ -184,4 +184,4 @@ def update_max_altitude(session=None): session.commit() logger.info("Logbook: {} entries updated.".format(update_logbook)) - return update_logbook + return "Logbook: {} entries updated.".format(update_logbook) diff --git a/ogn/collect/takeoff_landing.py b/ogn/collect/takeoff_landing.py index f2df2e8..fcfc739 100644 --- a/ogn/collect/takeoff_landing.py +++ b/ogn/collect/takeoff_landing.py @@ -134,7 +134,7 @@ def update_takeoff_landing(session=None): # mark the computated AircraftBeacons as 'used' update_aircraft_beacons = session.query(AircraftBeacon) \ .filter(AircraftBeacon.id == sq2.c.id) \ - .update({AircraftBeacon.status: 0}, + .update({AircraftBeacon.status: 1}, synchronize_session='fetch') session.commit()