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