| |
@@ -70,7 +70,7 @@
|
| |
|
| |
for entry in query.all():
|
| |
namespace, package, admin = entry
|
| |
- output[namespace][package] = set([admin])
|
| |
+ output[namespace][package] = [admin]
|
| |
|
| |
# Add the users with commit and admin ACLs
|
| |
|
| |
@@ -89,16 +89,11 @@
|
| |
|
| |
for entry in query.all():
|
| |
namespace, package, user = entry
|
| |
- output[namespace][package].add(user)
|
| |
-
|
| |
- # Convert the sets into lists
|
| |
- final = collections.defaultdict(dict)
|
| |
- for ns in output:
|
| |
- for pkg in output[ns]:
|
| |
- final[ns][pkg] = list(output[ns][pkg])
|
| |
+ if user not in output[namespace][package]:
|
| |
+ output[namespace][package].append(user)
|
| |
|
| |
with open(os.path.join(args[0], "pagure_owner_alias.json"), "w") as stream:
|
| |
- json.dump(final, stream, indent=4, sort_keys=True)
|
| |
+ json.dump(output, stream, indent=4, sort_keys=True)
|
| |
|
| |
session.remove()
|
| |
|
| |
Before this commit users were returned in a random order list.
See https://pagure.io/fedora-infrastructure/issue/10445#comment-772182 for the screenshot.
I don't have the database to test this, so the code is purely theoretical.