Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 7, 2023
1 parent 4fc6acc commit 3572efe
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -2814,7 +2814,11 @@ def is_valid_coordinate(coord):
raise HTTPException(status_code=400, detail=error_message)


def get_tasks_count(db:Session, project_id:int):
db_task = db.query(db_models.DbProject).filter(db_models.DbProject.id==project_id).first()
def get_tasks_count(db: Session, project_id: int):
db_task = (
db.query(db_models.DbProject)
.filter(db_models.DbProject.id == project_id)
.first()
)
task_count = len(db_task.tasks)
return task_count
return task_count

0 comments on commit 3572efe

Please sign in to comment.