From 6ddb2e28b6966ca60d630bfc58b6dce1eb57da8e Mon Sep 17 00:00:00 2001 From: Kory Becker Date: Mon, 10 Oct 2022 12:02:54 -0400 Subject: [PATCH 1/3] Fix for sort on browse tasks --- pybossa/cache/projects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybossa/cache/projects.py b/pybossa/cache/projects.py index 9e1aeb7d67..0d1183374e 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 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) From eb26c1dbc9a0b0bb7a6974e5ad62d55dfb6cd12e Mon Sep 17 00:00:00 2001 From: Kory Becker Date: Mon, 10 Oct 2022 12:11:52 -0400 Subject: [PATCH 2/3] fix --- pybossa/cache/projects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybossa/cache/projects.py b/pybossa/cache/projects.py index 0d1183374e..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 = order_by if not locked_tasks_in_project and order_by else 'id ASC' + 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) From cf030103934da570a44b05785db99f7bcc09c1a6 Mon Sep 17 00:00:00 2001 From: Kory Becker Date: Mon, 10 Oct 2022 12:46:23 -0400 Subject: [PATCH 3/3] touch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.