Skip to content

Commit

Permalink
improve date handling in inveniordm writer
Browse files Browse the repository at this point in the history
  • Loading branch information
mfenner committed Oct 13, 2024
1 parent 2734c45 commit 571adf0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion commonmeta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

__title__ = "commonmeta-py"
__version__ = "0.35"
__version__ = "0.37"
__author__ = "Martin Fenner"
__license__ = "MIT"

Expand Down
6 changes: 4 additions & 2 deletions commonmeta/writers/inveniordm_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ def write_inveniordm(metadata):
"publication_date": get_iso8601_date(metadata.date.get("published"))
if metadata.date.get("published", None)
else None,
"dates": compact([
"dates": [
{
"date": metadata.date.get("updated"),
"type": {"id": "updated"},
}
]),
]
if metadata.date.get("updated", None)
else None,
"subjects": presence(subjects),
"description": parse_attributes(
metadata.descriptions, content="description", first=True
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name="commonmeta-py"
version="0.35"
version="0.37"
repository = "https:/front-matter/commonmeta-py"
homepage = "https://python.commonmeta.org"
documentation = "https://python.commonmeta.org"
Expand Down

0 comments on commit 571adf0

Please sign in to comment.