Lepsi stahovani informaci o pocasi
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
from operator import or_
|
||||
from typing import Set, Optional
|
||||
|
||||
from sqlalchemy import and_
|
||||
|
||||
from database import models
|
||||
from database.transaction import get_session
|
||||
from graphql_schema.entities.helpers.combobox import handle_combobox_save
|
||||
@@ -77,7 +75,7 @@ class AircraftMutationResolver(BaseMutationResolver):
|
||||
|
||||
return await self._do_create(db, data=input_data)
|
||||
|
||||
async def update(self, id: int, user_id: int, data: EditAircraftInput) -> Aircraft:
|
||||
async def update(self, context, id: int, data: EditAircraftInput) -> Aircraft:
|
||||
update_data = data.to_dict()
|
||||
async with get_session() as db:
|
||||
if data.organization:
|
||||
@@ -85,7 +83,7 @@ class AircraftMutationResolver(BaseMutationResolver):
|
||||
db,
|
||||
models.Organization,
|
||||
input=data.organization,
|
||||
user_id=user_id,
|
||||
user_id=context.user_id,
|
||||
)
|
||||
|
||||
return await self._do_update(db, id, update_data)
|
||||
|
||||
Reference in New Issue
Block a user