DB: fix last_known_squadron for *cold* start

This commit is contained in:
norohind 2022-04-19 15:46:26 +03:00
parent 7f7d326ca1
commit 9ed6e786e6
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

3
DB.py
View File

@ -92,7 +92,8 @@ def build_squadrons_current_data() -> None:
def last_known_squadron() -> int:
if (res := db.execute(SQLRequests.last_known_squadron).fetchone()) is None:
res = db.execute(SQLRequests.last_known_squadron).fetchone()
if res is None or res['squad_id'] is None:
return 0
else: