Skip to content

Commit

Permalink
legacy: accept old format license
Browse files Browse the repository at this point in the history
  • Loading branch information
zzacharo committed Oct 19, 2023
1 parent 0e028a0 commit c230726
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions legacy/zenodo_legacy/licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def legacy_to_rdm(license):
"""Returns an RDM license given a zenodo legacy license."""
if not license:
return

if isinstance(license, dict):
license = license["id"]

normalized = license.lower().strip()
_license = LEGACY_ALIASES.get(normalized, normalized).lower()

Expand Down

0 comments on commit c230726

Please sign in to comment.