diff --git a/README.md b/README.md index 7b8c9a024e..b19bb10c8a 100644 --- a/README.md +++ b/README.md @@ -117,4 +117,4 @@ The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. -Documentation and media is under a Creative Commons Attribution License version 3. \ No newline at end of file +Documentation and media is under a Creative Commons Attribution License version 3. diff --git a/pybossa/cache/projects.py b/pybossa/cache/projects.py index 9e1aeb7d67..fda319547a 100644 --- a/pybossa/cache/projects.py +++ b/pybossa/cache/projects.py @@ -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 or 'id ASC' sql_query = sql + sql_order.format(sql_order_by) + sql_limit_offset results = session.execute(text(sql_query), params)