Fix nacitani seznamu letu

This commit is contained in:
Michal Kváček
2026-01-26 16:23:35 +01:00
parent 888351baac
commit 420774f1b4
2 changed files with 5 additions and 3 deletions
@@ -58,10 +58,12 @@ class FlightQueryResolver(BaseQueryResolver):
if kwargs.get("point_of_interest_id"):
query = (
query
.join(models.Flight.turn_points, isouter=True)
.filter(
or_(
models.FlightTurnPoint.point_of_interest_id == kwargs["point_of_interest_id"],
models.Flight.id.in_(
select(models.FlightTurnPoint.flight_id)
.filter(models.FlightTurnPoint.point_of_interest_id == kwargs["point_of_interest_id"])
),
models.Flight.id.in_(
select(models.Photo.flight_id)
.filter(models.Photo.point_of_interest_id == kwargs["point_of_interest_id"])
+1 -1
View File
@@ -12,7 +12,7 @@ router = APIRouter()
if APP_DEBUG:
@router.get("/graphql/autologin")
async def autologin():
access_token = access_security.create_access_token(subject={"id": 6, "name": "Franta Vomacka"})
access_token = access_security.create_access_token(subject={"id": 1, "name": "Franta Vomacka"})
response = RedirectResponse(url="/graphql")
access_security.set_access_cookie(response, access_token, expires_delta=timedelta(days=14))