feat: module dependencies
This commit is contained in:
@ -21,8 +21,9 @@ class ProjectRepository(
|
|||||||
async def update(self, project: Project, data: UpdateProjectSchema) -> Project:
|
async def update(self, project: Project, data: UpdateProjectSchema) -> Project:
|
||||||
if data.built_in_modules is not None:
|
if data.built_in_modules is not None:
|
||||||
built_in_modules = data.built_in_modules
|
built_in_modules = data.built_in_modules
|
||||||
data.built_in_modules = await BuiltInModuleRepository(self.session).get_by_ids(
|
module_ids = [module.id for module in built_in_modules]
|
||||||
[module.id for module in built_in_modules]
|
data.built_in_modules = await BuiltInModuleRepository(
|
||||||
)
|
self.session
|
||||||
|
).get_by_ids(module_ids)
|
||||||
|
|
||||||
return await self._apply_update_data_to_model(project, data, True)
|
return await self._apply_update_data_to_model(project, data, True)
|
||||||
|
|||||||
@ -9,6 +9,7 @@ class BuiltInModuleSchema(BaseSchema):
|
|||||||
label: str
|
label: str
|
||||||
icon_name: str
|
icon_name: str
|
||||||
description: str
|
description: str
|
||||||
|
depends_on: list["BuiltInModuleSchema"]
|
||||||
|
|
||||||
|
|
||||||
# endregion
|
# endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user