Skip to content

Commit

Permalink
add the issued date created from the date in the metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
kimakan committed Dec 13, 2022
1 parent 2c447e4 commit aed2507
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions daiquiri/core/renderers/datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ def render_datacite(self, metadata):
self.end('contributors')

updated = metadata.get('updated')
if updated is not None:
published = metadata.get('published')
if updated is not None or published is not None:
self.start('dates')
self.node('date', {'dateType': 'Updated'}, updated)
if updated:
self.node('date', {'dateType': 'Updated'}, updated)
if published:
self.node('date', {'dateType': 'Issued'}, published)
self.end('dates')

self.node('language', {}, metadata.get('language'))
Expand Down
2 changes: 2 additions & 0 deletions daiquiri/metadata/serializers/datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class Meta:
'publication_year',
'subjects',
'contributors',
'published',
'updated',
'language',
'resource_type',
Expand Down Expand Up @@ -113,6 +114,7 @@ class Meta:
'publication_year',
'subjects',
'contributors',
'published',
'updated',
'language',
'resource_type',
Expand Down

0 comments on commit aed2507

Please sign in to comment.