Skip to content

Commit

Permalink
make sure projectNumber is int and not string when sorting inactive p…
Browse files Browse the repository at this point in the history
…rojects
  • Loading branch information
Hagellach37 committed Mar 4, 2022
1 parent e7de42c commit 473ccc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mapswipe_workers/python_scripts/update_project_status.py
Original file line number Diff line number Diff line change
@@ -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(

0 comments on commit 473ccc9

Please sign in to comment.