Sada bugfixu
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from aiohttp import ClientResponseError
|
||||
from sqlalchemy import select
|
||||
from database import models
|
||||
from database.transaction import get_session
|
||||
@@ -16,18 +15,15 @@ async def add_terrain_elevation_to_flight(flight_id: int):
|
||||
.join(models.Track.flight)
|
||||
.filter(models.Flight.id == flight_id))
|
||||
).all()
|
||||
try:
|
||||
await update_track_points_elevation(db, track_points)
|
||||
except ClientResponseError as e:
|
||||
print(e)
|
||||
await update_track_points_elevation(db, track_points)
|
||||
|
||||
|
||||
@retryable
|
||||
async def add_terrain_elevation_to_photo(photo):
|
||||
try:
|
||||
elevation = await elevation_api.get_elevation_for_points([
|
||||
{"lat": photo.gps_latitude, "lng": photo.gps_longitude}
|
||||
])
|
||||
elevation = await elevation_api.get_elevation_for_points(
|
||||
[{"lat": photo.gps_latitude, "lng": photo.gps_longitude}]
|
||||
)
|
||||
if not elevation:
|
||||
print("Cannot get elevation")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user