Skip to content

Commit

Permalink
fix (TaskQueueDB): correct group to vo conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Oct 3, 2023
1 parent c42b104 commit b34b54e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/DIRAC/WorkloadManagementSystem/DB/TaskQueueDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit b34b54e

Please sign in to comment.