From 473ccc98c4483b9bfbe6bbf343510525799a4845 Mon Sep 17 00:00:00 2001 From: Hagellach37 Date: Fri, 4 Mar 2022 14:27:12 +0100 Subject: [PATCH] make sure projectNumber is int and not string when sorting inactive projects --- mapswipe_workers/python_scripts/update_project_status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapswipe_workers/python_scripts/update_project_status.py b/mapswipe_workers/python_scripts/update_project_status.py index 4708cea62..f0aef7885 100644 --- a/mapswipe_workers/python_scripts/update_project_status.py +++ b/mapswipe_workers/python_scripts/update_project_status.py @@ -65,7 +65,7 @@ def run_update_project_status(filter_string: str) -> None: # We sort projects by their attribute "projectNumber" to ensure that # always the lowest one will be set to "status=active" next. inactive_projects = OrderedDict( - sorted(inactive_projects.items(), key=lambda x: x[1]["projectNumber"]) + sorted(inactive_projects.items(), key=lambda x: int(x[1]["projectNumber"])) ) new_active_projects = filter_projects_by_name_and_progress(