From 3d75e165d76b74e1ca352c080533d11cc66e0699 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Sun, 14 Jan 2024 19:47:18 +0100 Subject: [PATCH] fix: fix locations GET filters. ref #138 --- app/crud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/crud.py b/app/crud.py index 1fdc5d26..a3c9d5ed 100644 --- a/app/crud.py +++ b/app/crud.py @@ -335,8 +335,8 @@ def get_locations_query(filters: LocationFilter | None = None): return query -def get_locations(db: Session): - return db.execute(get_locations_query()).all() +def get_locations(db: Session, filters: LocationFilter | None = None): + return db.execute(get_locations_query(filters=filters)).all() def get_location_by_id(db: Session, id: int):