Skip to content

Commit 0c03744

Browse files
authored
Merge pull request #65 from stackhpc/upstream/2023.1-2023-11-20
Synchronise 2023.1 with upstream
2 parents b101365 + 8c44864 commit 0c03744

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

cloudkitty/api/v2/task/reprocess.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,14 @@ def get(self, scope_ids=[], path_scope_id=None, offset=0, limit=100,
286286
if not isinstance(scope_ids, list):
287287
scope_ids = [scope_ids]
288288

289+
# Some versions of python-cloudkittyclient can send the order in upper
290+
# case, e.g. "DESC". Convert it to lower case for compatibility.
291+
order = order.lower()
292+
289293
if order not in ACCEPTED_GET_REPROCESSING_REQUEST_ORDERS:
290294
raise http_exceptions.BadRequest(
291-
"The order [%s] is not valid. Accepted values are %s.",
292-
order, ACCEPTED_GET_REPROCESSING_REQUEST_ORDERS)
295+
"The order [%s] is not valid. Accepted values are %s." %
296+
(order, ACCEPTED_GET_REPROCESSING_REQUEST_ORDERS))
293297

294298
schedules = self.schedule_reprocessing_db.get_all(
295299
identifier=scope_ids, remove_finished=False,
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Fix retrieval of reprocessing tasks which was returning ``Internal Server
5+
Error``.

0 commit comments

Comments
 (0)