Skip to content

Commit

Permalink
Fixing comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Oct 16, 2024
1 parent fa9d40f commit 76e7919
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/tuber/api/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def paginate(query, model, event=None, department=None):
f"User is not able to read any values in {model.__tablename__}")
filters.append(model.id.in_(ids))
if event:
filters.append(model.event == event)
filters.append(model.event == int(event))
if department:
filters.append(model.department == department)
filters.append(model.department == int(department))
if search_field:
if hasattr(model, search_field):
columns, relationships = model.get_fields()
Expand Down

0 comments on commit 76e7919

Please sign in to comment.