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 20, 2023
1 parent 7f5c376 commit 674bb37
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_projects(
limit: int = 100,
db_objects: bool = False,
hashtags: List[str] = None,
search:str = None,
search: str = None,
):
filters = []
if user_id:
Expand Down Expand Up @@ -117,7 +117,12 @@ def get_projects(


def get_project_summaries(
db: Session, user_id: int, skip: int = 0, limit: int = 100, hashtags: str = None, search: str = None,
db: Session,
user_id: int,
skip: int = 0,
limit: int = 100,
hashtags: str = None,
search: str = None,
):
# TODO: Just get summaries, something like:
# db_projects = db.query(db_models.DbProject).with_entities(
Expand Down
4 changes: 3 additions & 1 deletion src/backend/app/projects/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ async def read_project_summaries(
hasPrev = page > 1
total_pages = (total_projects + results_per_page - 1) // results_per_page

projects = project_crud.get_project_summaries(db, user_id, skip, limit, hashtags, search)
projects = project_crud.get_project_summaries(
db, user_id, skip, limit, hashtags, search
)
project_summaries = [
project_schemas.ProjectSummary.from_db_project(project) for project in projects
]
Expand Down

0 comments on commit 674bb37

Please sign in to comment.