From eb39d8afa0d848806a701bc535c87dc132670450 Mon Sep 17 00:00:00 2001 From: Andrii Lytovchenko Date: Thu, 23 Jun 2022 11:01:00 +0300 Subject: [PATCH] fix: sort parameter is optional --- .../WebApp/handler/TransformationMonitorHandler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py b/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py index 0bedb0c0f..4828529b4 100644 --- a/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py +++ b/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py @@ -16,7 +16,7 @@ class TransformationMonitorHandler(WebHandler): DEFAULT_AUTHORIZATION = "authenticated" def web_getSelectionData(self): - if self.getUserName() == "Anonymous": + if self.getUserName().lower() == "anonymous": return {"prod": [["Insufficient rights"]]} tsClient = TransformationClient() @@ -78,7 +78,7 @@ def web_getSelectionData(self): def web_getTransformationData( self, - sort, + sort=None, date=None, endDate=None, endTime=None, @@ -97,7 +97,7 @@ def web_getTransformationData( ): pagestart = datetime.datetime.utcnow() - if self.getUserName() == "Anonymous": + if self.getUserName().lower() == "anonymous": return {"success": "false", "error": "You are not authorised"} params = self.__prepareParameters(