Commit 60be8e09 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update CheckAndFix.temporary_record to inhibit it for inspirehep.net

parent 1ba1fa16
......@@ -1006,6 +1006,10 @@ class CheckAndFix(object):
def temporary_record(self, record):
"""Some records are marked temporary.
Note:
Always return False for record from inspirehep.net
since this information is not there anymore.
Args:
record (RecordPubli):
record describing a publication.
......@@ -1024,11 +1028,10 @@ class CheckAndFix(object):
# or the corresponding JSON field (old.inspirehep.net)
# http://inspirehep.net/comment="*Temporary record*"
#
# for the new inspirehep API curated is False
# for the new inspirehep API curated is False can be used
# however this is too large compare previous method
#
is_temporary = \
("comment" in record and record["comment"] == TMP_REC) \
or ("curated" in record and record["curated"] is False)
is_temporary = "comment" in record and record["comment"] == TMP_REC
if is_temporary:
raise CheckException(MSG_TEMPORARY_RECORD)
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