Skip to content

Commit 93bd0ec

Browse files
authored
Merge pull request #8 from edquist/SOFTWARE-5057.gid-formatting-fixup
allow gids to be passed as strings (SOFTWARE-5057)
2 parents 016d1b2 + 41718b5 commit 93bd0ec

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

create_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def get_co_person_identifiers(pid):
137137

138138

139139
def get_co_group(gid):
140-
grouplist = call_api("co_groups/%d.json" % gid) | get_datalist("CoGroups")
140+
grouplist = call_api("co_groups/%s.json" % gid) | get_datalist("CoGroups")
141141
if not grouplist:
142142
raise RuntimeError("No such CO Group Id: %s" % gid)
143143
return grouplist[0]

group_fixup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def get_co_person_identifiers(pid):
145145

146146

147147
def get_co_group(gid):
148-
grouplist = call_api("co_groups/%d.json" % gid) | get_datalist("CoGroups")
148+
grouplist = call_api("co_groups/%s.json" % gid) | get_datalist("CoGroups")
149149
if not grouplist:
150150
raise RuntimeError("No such CO Group Id: %s" % gid)
151151
return grouplist[0]
@@ -252,7 +252,7 @@ def show_group_identifiers(gid):
252252

253253

254254
def delete_identifier(id_):
255-
return call_api2(DELETE, "identifiers/%d.json" % id_)
255+
return call_api2(DELETE, "identifiers/%s.json" % id_)
256256

257257

258258
def rename_co_group(gid, group, newname):
@@ -268,7 +268,7 @@ def rename_co_group(gid, group, newname):
268268
"RequestType" : "CoGroups",
269269
"Version" : "1.0"
270270
}
271-
return call_api3(PUT, "co_groups/%d.json" % gid, data)
271+
return call_api3(PUT, "co_groups/%s.json" % gid, data)
272272

273273

274274
def fixup_unixcluster_group(gid):

0 commit comments

Comments
 (0)