Skip to content

Commit

Permalink
Fix for sort on browse tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
kbecker42 committed Oct 10, 2022
1 parent fd79a78 commit 6ddb2e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pybossa/cache/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def search_lock_status_sorting_result():
# if not sort by lock_status or locked_tasks_in_project is empty/None,
# sort by the column "order_by"
order_by = args.get('order_by')
sql_order_by = 'id ASC' if not (locked_tasks_in_project and order_by) else order_by
sql_order_by = order_by if not locked_tasks_in_project and order_by else 'id ASC'
sql_query = sql + sql_order.format(sql_order_by) + sql_limit_offset

results = session.execute(text(sql_query), params)
Expand Down

0 comments on commit 6ddb2e2

Please sign in to comment.