diff --git a/cloudkitty/api/v2/task/reprocess.py b/cloudkitty/api/v2/task/reprocess.py index 197bb298..2d6deef0 100644 --- a/cloudkitty/api/v2/task/reprocess.py +++ b/cloudkitty/api/v2/task/reprocess.py @@ -286,10 +286,14 @@ class ReprocessSchedulerGetApi(base.BaseResource): if not isinstance(scope_ids, list): scope_ids = [scope_ids] + # Some versions of python-cloudkittyclient can send the order in upper + # case, e.g. "DESC". Convert it to lower case for compatibility. + order = order.lower() + if order not in ACCEPTED_GET_REPROCESSING_REQUEST_ORDERS: raise http_exceptions.BadRequest( - "The order [%s] is not valid. Accepted values are %s.", - order, ACCEPTED_GET_REPROCESSING_REQUEST_ORDERS) + "The order [%s] is not valid. Accepted values are %s." % + (order, ACCEPTED_GET_REPROCESSING_REQUEST_ORDERS)) schedules = self.schedule_reprocessing_db.get_all( identifier=scope_ids, remove_finished=False, diff --git a/releasenotes/notes/reprocess-get-fix-f2bd1f2f9e2d640e.yaml b/releasenotes/notes/reprocess-get-fix-f2bd1f2f9e2d640e.yaml new file mode 100644 index 00000000..e3b9c945 --- /dev/null +++ b/releasenotes/notes/reprocess-get-fix-f2bd1f2f9e2d640e.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fix retrieval of reprocessing tasks which was returning ``Internal Server + Error``.