From fa58375e9a4e26b051003fb520cb827fb47d03e4 Mon Sep 17 00:00:00 2001 From: Vermaas <vermaas@astron.nl> Date: Tue, 2 Jul 2024 15:36:46 +0200 Subject: [PATCH] add sort direction --- spaceweather_processing/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spaceweather_processing/app.py b/spaceweather_processing/app.py index 8c956ad..f5b09e6 100644 --- a/spaceweather_processing/app.py +++ b/spaceweather_processing/app.py @@ -136,7 +136,7 @@ class DataProductDB: # if a &sort=<field> url parameter is given then use sort, otherwise omit it (backward compatibility) if sort: - if sort[0]=='-': + if sort.startswith('-'): direction = -1 sort = sort[1:] else: -- GitLab