Skip to content

Commit

Permalink
Removed order by on document search.
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch committed Dec 7, 2023
1 parent 156074f commit dd2cd63
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/repository/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,9 @@ def search(

condition = and_(*search) if len(search) > 1 else search[0]
try:
# TODO: Fix order by on search PDCT-672
result = (
_get_query(db)
.filter(condition)
.order_by(desc(FamilyDocument.last_modified))
.limit(query_params["max_results"])
.all()
_get_query(db).filter(condition).limit(query_params["max_results"]).all()
)
except OperationalError as e:
if "canceling statement due to statement timeout" in str(e):
Expand Down

0 comments on commit dd2cd63

Please sign in to comment.