Skip to content

Commit

Permalink
PY3: Convert map to list
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr committed Jun 22, 2021
1 parent 1ebb364 commit 2e5f53c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/WebAppDIRAC/WebApp/handler/ComponentHistoryHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def web_getSelectionData(self):
for field in fields:
data[field] = list(data[field])
data[field].sort()
data[field] = map(lambda x: [x], data[field])
data[field] = [[x] for x in data[field]]
else:
raise WErr.fromSERROR(result)

Expand Down
4 changes: 2 additions & 2 deletions src/WebAppDIRAC/WebApp/handler/ProxyManagerHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def web_getSelectionData(self):
groups = uniqueElements(groups)
users.sort()
groups.sort()
users = map(lambda x: [x], users)
groups = map(lambda x: [x], groups)
users = [[x] for x in users]
groups = [[x] for x in groups]

callback["username"] = users
callback["usergroup"] = groups
Expand Down
4 changes: 2 additions & 2 deletions src/WebAppDIRAC/WebApp/handler/SystemAdministrationHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,15 @@ def web_getUsersGroups(self):
return
result = result["Value"]

users = map(lambda x: [x], result)
users = [[x] for x in result]

result = gConfig.getSections("/Registry/Groups")
if not result["OK"]:
self.finish({"success": "false", "error": result["Message"]})
return
result = result["Value"]

groups = map(lambda x: [x], result)
groups = [[x] for x in result]

self.finish({"success": "true", "users": users, "groups": groups, "email": self.getUserEmail()})

Expand Down

0 comments on commit 2e5f53c

Please sign in to comment.