refac
This commit is contained in:
1 parent
0576e8eeb5
commit
f1409266fe
8 files changed
+33
-33
No files matched your search
@@ -199,11 +199,11 @@ class ModelsTable:
|
||||
if db is not None:
|
||||
await db.commit()
|
||||
|
||||
model_data = ModelModel.model_validate(model).model_dump(exclude={'access_grants'})
|
||||
model_data['access_grants'] = (
|
||||
access_grants if access_grants is not None else await self._get_access_grants(model_data['id'], db=db)
|
||||
model_model = ModelModel.model_validate(model)
|
||||
model_model.access_grants = (
|
||||
access_grants if access_grants is not None else await self._get_access_grants(model_model.id, db=db)
|
||||
)
|
||||
return ModelModel.model_validate(model_data)
|
||||
return model_model
|
||||
|
||||
async def insert_new_model(
|
||||
self, form_data: ModelForm, user_id: str, db: AsyncSession | None = None
|
||||
|
||||
Reference in new issue
Block a user