diff --git a/app/repositories/grand_project.py b/app/repositories/grand_project.py index d37660d..e9a4ba9 100644 --- a/app/repositories/grand_project.py +++ b/app/repositories/grand_project.py @@ -14,7 +14,8 @@ class GrandProjectRepository(BaseRepository[GrandProjectModel]): def check_weight(self,_inp:GrandProjectModel): sum = 0 for project in _inp.assign_project: - sum = project.weight + sum += project.weight + print(sum) if sum != 100: raise HTTPException(422, 'مجموعه وزن ها باید صد درصد باشد') async def create(self, create: GrandProjectModel):