diff options
| -rw-r--r-- | python/fatcat/crossref_importer.py | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/python/fatcat/crossref_importer.py b/python/fatcat/crossref_importer.py index 99fed8d5..1adc6d70 100644 --- a/python/fatcat/crossref_importer.py +++ b/python/fatcat/crossref_importer.py @@ -64,14 +64,18 @@ class FatcatCrossrefImporter(FatcatImporter):                  else:                      # TODO: defaults back to a pseudo-null value                      raw_name = am.get('given', '<blank>') -                extra = None +                extra = dict()                  if ctype == "author":                      index = i                  else:                      index = None                  if am.get('affiliation'):                      # note: affiliation => affiliations -                    extra = dict(affiliations=am.get('affiliation')) +                    extra['affiliations'] = am.get('affiliation') +                if am.get('sequence') and am.get('sequence') != "additional": +                    extra['sequence'] = am.get('sequence') +                if not extra: +                    extra = None                  contribs.append(fatcat_client.ReleaseContrib(                      creator_id=creator_id,                      index=index, | 
