We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20e9f69 commit 28541c1Copy full SHA for 28541c1
contributors.py
@@ -9,9 +9,10 @@
9
10
# Ensure that we have unique indices for the affiliations
11
affiliations = list()
12
-for authors in data["authors"]:
13
- affiliations.extend(authors.get("affiliations", []))
14
-data["affiliations"] = {aff: i + 1 for i, aff in enumerate(set(affiliations))}
+for author in data["authors"]:
+ affiliations.extend(author.get("affiliations", []))
+data["affiliations"] = {aff: i + 1 for i, aff in enumerate(list(dict.fromkeys(affiliations)))}
15
+print(data['affiliations'])
16
for author in data["authors"]:
17
author["affiliations"] = [data["affiliations"][aff] for aff in author.get("affiliations", [])]
18
0 commit comments