diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-13 14:23:02 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-13 14:23:06 -0700 |
commit | 955d4942d5111cbbd8f4b99d4e3c6d79262dab6e (patch) | |
tree | 87757a7afdf00ab6de5ed7455267654bf49b5239 /python/fatcat_tools/importers/cdl_dash_dat.py | |
parent | 287e892abb4adac8ea7f7211524a41c7cd06851c (diff) | |
download | fatcat-955d4942d5111cbbd8f4b99d4e3c6d79262dab6e.tar.gz fatcat-955d4942d5111cbbd8f4b99d4e3c6d79262dab6e.zip |
partial python impl of ext_id and release_stage refactors
Diffstat (limited to 'python/fatcat_tools/importers/cdl_dash_dat.py')
-rwxr-xr-x | python/fatcat_tools/importers/cdl_dash_dat.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/python/fatcat_tools/importers/cdl_dash_dat.py b/python/fatcat_tools/importers/cdl_dash_dat.py index 1a21194d..e1252b6d 100755 --- a/python/fatcat_tools/importers/cdl_dash_dat.py +++ b/python/fatcat_tools/importers/cdl_dash_dat.py @@ -96,7 +96,9 @@ def cdl_dash_release(meta, extra=None): )) r = ReleaseEntity( - doi=doi, + ext_ids=ReleaseEntityExtIds( + doi=doi, + ), title=clean(meta['title'], force_xml=True), publisher=clean(meta['publisher']), release_year=int(meta['publicationYear']), @@ -170,9 +172,9 @@ def auto_cdl_dash_dat(api, dat_path, release_id=None, editgroup_id=None): agent="fatcat_tools.auto_cdl_dash_dat"))) editgroup_id = eg.editgroup_id - if not release_id and release.doi: + if not release_id and release.ext_ids.doi: try: - r = api.lookup_release(doi=release.doi) + r = api.lookup_release(doi=release.ext_ids.doi) release_id = r.ident except fatcat_client.rest.ApiException: pass |