From 348e8752630f8ad7dad1fadbe4c9888b6375303e Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Tue, 3 Oct 2023 16:56:33 +0200 Subject: [PATCH] fix (TaskQueueDB): correct group to vo conversion --- src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py b/src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py index 45a3dcc6d0c..e013a55cab8 100755 --- a/src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py +++ b/src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py @@ -170,6 +170,12 @@ def _checkTaskQueueDefinition(self, tqDefDict): Check a task queue definition dict is valid """ + if "OwnerGroup" in tqDefDict: + result = self._escapeString(Registry.getVOForGroup(tqDefDict["OwnerGroup"])) + if not result["OK"]: + return result + tqDefDict["VO"] = result["Value"] + for field in singleValueDefFields: if field == "CPUTime": if not isinstance(tqDefDict[field], int): @@ -255,7 +261,7 @@ def __createTaskQueue(self, tqDefDict, priority=1, connObj=False): sqlSingleFields.append(field) sqlValues.append(tqDefDict[field]) sqlSingleFields.append("VO") - sqlValues.append(Registry.getVOForGroup(tqDefDict["OwnerGroup"])) + sqlValues.append(tqDefDict["VO"]) # Insert the TQ Disabled sqlSingleFields.append("Enabled") sqlValues.append("0")