Skip to content

Commit 9dba948

Browse files
fix: Fixed migration so that it works
1 parent 2410060 commit 9dba948

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/DIRAC/WorkloadManagementSystem/FutureClient/PilotManagerClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class PilotManagerClient(FutureClient):
66
@convertToReturnValue
77
def addPilotReferences(self, pilot_references, VO, gridType="DIRAC", pilot_stamps_dict={}):
88
with DiracXClient() as api:
9-
pilot_stamps = list(pilot_stamps_dict.values())
9+
pilot_stamps = [pilot_stamps_dict.get(ref, ref) for ref in pilot_references]
1010
pilot_ref_dict = dict(zip(pilot_stamps, pilot_references))
1111

1212
# We will move toward a stamp as identifier for the pilot

tests/Integration/WorkloadManagementSystem/Test_PilotsClient.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def test_PilotsDB():
3030
for pilot_ref in ["aPilot", "anotherPilot"]:
3131
res = pilots.deletePilot(pilot_ref)
3232

33-
res = pilots.addPilotReferences(["aPilot"], "VO")
33+
res = pilots.addPilotReferences(["aPilot"], "vo")
3434
assert res["OK"], res["Message"]
35-
res = pilots.addPilotReferences(["aPilot"], "VO")
35+
res = pilots.addPilotReferences(["aPilot"], "vo")
3636

3737
# Duplicates to see if we have a conflict
3838
# If supports diracx, then it should be detected
@@ -44,7 +44,7 @@ def test_PilotsDB():
4444
res = pilots.deletePilots("aPilot")
4545
assert res["OK"], res["Message"]
4646

47-
res = pilots.addPilotReferences(["anotherPilot"], "VO")
47+
res = pilots.addPilotReferences(["anotherPilot"], "vo")
4848
assert res["OK"], res["Message"]
4949

5050
res = pilots.getPilotInfo("anotherPilot")

0 commit comments

Comments
 (0)