Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit dcc4ac0e authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update wizards/affiliation_institute to add protection.

parent eff54151
......@@ -50,14 +50,13 @@ def affiliation_institute():
# extract keys defining the affiliation
# u and v are the main keys use in inspirehep and cds
# b is uses by some note in Atlas
key_1 = dict(key_u=record[u"110"]["u"], key_v="")
key_2 = dict(key_u=record[u"110"]["t"], key_v="")
key_3 = dict(key_u=record[u"110"]["b"], key_v="")
keys = (record[u"110"][k] for k in ("u", "t", "b") if k in record[u"110"])
keys = (dict(key_u=key, key_v="") for key in keys)
# check that the rules does not exist
# load new rules
is_key_add = False
for key in (key_1, key_2, key_3):
for key in keys:
if get_id(db.affiliation_keys, **key) is None:
db.affiliation_keys[0] = key
is_key_add = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment