Reset hesla, doplneni mailu

This commit is contained in:
Michal Kváček
2024-02-08 16:26:12 +01:00
parent 03c9f2d189
commit c26eb97288
11 changed files with 235 additions and 79 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ from logger import log
async def download_weather(date_time: datetime, flight_id: int, airport_id: int, type_: Literal['landing', 'takeoff']):
async with get_session() as db:
airport = await models.Airport.get_one(db, airport_id)
airport = await models.Airport.get_one(db, id=airport_id)
gps = (airport.gps_latitude, airport.gps_longitude)
try:
@@ -31,7 +31,7 @@ async def download_weather(date_time: datetime, flight_id: int, airport_id: int,
}
async with get_session() as db:
flight = await models.Flight.get_one(db, flight_id)
flight = await models.Flight.get_one(db, id=flight_id)
existing_weather_id = getattr(flight, f'{type_}_weather_info_id')
if existing_weather_id: