reverted some changes

reverted changes to purgeAircraft, purgeFlights, purgePositions as these are used as simple TRUE/FALSE tests.
split the changes to purge_days_old to to using the more popular seeming fetchone()[0] and a seperate cast to int
pull/448/head
target-drone 2018-07-03 15:43:01 +01:00 zatwierdzone przez GitHub
rodzic 14a820e748
commit dd43ba1b37
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -64,21 +64,21 @@ while True:
cursor.execute("SELECT value FROM adsb_settings WHERE name = 'purgeFlights'")
row = cursor.fetchone()
if row:
purge_flights = int(row[0])
purge_flights = row
purge_positions = False
# MySQL and SQLite
cursor.execute("SELECT value FROM adsb_settings WHERE name = 'purgePositions'")
row = cursor.fetchone()
if row:
purge_positions = int(row[0])
purge_positions = row
purge_days_old = False
# MySQL and SQLite
cursor.execute("SELECT value FROM adsb_settings WHERE name = 'purgeDaysOld'")
row = cursor.fetchone()
row = cursor.fetchone()[0]
if row:
purge_days_old = int(row[0])
purge_days_old = int(row)
## Create the purge date from the age specified.