fix: fixed module updating

This commit is contained in:
2025-10-25 18:04:58 +04:00
parent fcaa7fe177
commit a579ae4145

View File

@ -31,13 +31,6 @@ class ModuleService(
raise ObjectNotFoundException(f"Модуль с ID {pk} не найден")
return GetByIdWithAttributesResponse(entity=module)
async def update_module_common_info(
self, module_id: int, request: UpdateModuleCommonInfoRequest
) -> UpdateModuleCommonInfoResponse:
module = await self.repository.get_by_id(module_id)
await self.repository.update(module, request)
return UpdateModuleCommonInfoResponse(message="Данные модуля успешно сохранены")
def _build_modules_with_attributes(
self, result: list[tuple]
) -> dict[int, ModuleWithAttributesSchema]: