From 66a61f3dd23429de894b775cc6ab83f48c1e6b29 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" Date: Wed, 9 Sep 2020 12:10:23 +0200 Subject: [PATCH] gitea.tasks: Fix parameter name from 'sort' to 'order' This fixes [1] [1] https://sentry.softwareheritage.org/share/issue/b0119b56f24347bcb58ac28c68685c62/ --- swh/lister/gitea/tasks.py | 2 +- swh/lister/gitea/tests/test_tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/swh/lister/gitea/tasks.py b/swh/lister/gitea/tasks.py index c6af374..098f822 100644 --- a/swh/lister/gitea/tasks.py +++ b/swh/lister/gitea/tasks.py @@ -16,7 +16,7 @@ NBPAGES = 10 @shared_task(name=__name__ + ".IncrementalGiteaLister") def list_gitea_incremental(**lister_args): """Incremental update of a Gitea instance""" - lister_args["sort"] = "desc" + lister_args["order"] = "desc" lister = GiteaLister(**lister_args) total_pages = lister.get_pages_information()[1] # stopping as soon as existing origins for that instance are detected diff --git a/swh/lister/gitea/tests/test_tasks.py b/swh/lister/gitea/tests/test_tasks.py index 4c223b6..5c070b5 100644 --- a/swh/lister/gitea/tests/test_tasks.py +++ b/swh/lister/gitea/tests/test_tasks.py @@ -31,7 +31,7 @@ def test_incremental(lister, swh_scheduler_celery_app, swh_scheduler_celery_work res.wait() assert res.successful() - lister.assert_called_once_with(sort="desc") + lister.assert_called_once_with(order="desc") lister.db_last_index.assert_not_called() lister.get_pages_information.assert_called_once_with() lister.run.assert_called_once_with(min_bound=1, max_bound=10, check_existence=True)