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

Update factory and recordconf to add protections.

parent efc20395
......@@ -56,7 +56,7 @@ def add_affiliation_keys(recjson):
di[el[0:1]] = el[1:]
recjson["corporate_note"] = {"identifier": di["u"],
"future_identifier": di["t"]}
"future_identifier": di["t"]}
def add_conference_data(recjson):
......
......@@ -68,10 +68,13 @@ class RecordConf(RecordPubli):
"""The conference identifier used in the store.
Returns:
int:
int or None
"""
return self["meeting_note"]["recid"]
if "meeting_note" not in self:
return None
return self["meeting_note"].get("recid")
def conference_key(self):
"""The conference key used in the store.
......@@ -151,7 +154,10 @@ class RecordConf(RecordPubli):
is not defined.
"""
return self["meeting_note"]["url"]
if "meeting_note" not in self:
return ""
return self["meeting_note"].get("url", "")
def conference_year(self):
"""The year of the conference.
......
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