Skip to content

Commit

Permalink
Preserve empty str given as IdentifiableArtefact.id
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Oct 23, 2024
1 parent 330286c commit 540c943
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdmx/model/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ def __post_init__(self):
# Validate URN, if any
self._urn = URN(self.urn)

if not self.id:
if self.id is MissingID:
# Try to retrieve an item ID from the URN, if any
self.id = self._urn.item_id or self._urn.id or MissingID
elif self.urn and self.id not in (self._urn.item_id or self._urn.id):
# Ensure explicit ID is consistent with URN
Expand Down

0 comments on commit 540c943

Please sign in to comment.