Skip to content

Commit

Permalink
Also resolve by version in .xml…Reader.maintainable()
Browse files Browse the repository at this point in the history
Resolves #164.
  • Loading branch information
khaeru committed Feb 4, 2024
1 parent 13cc1c2 commit 578c749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdmx/reader/xml/v21.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,8 @@ def maintainable(self, cls, elem, **kwargs):
self.ignore.add(id(maint))
obj.maintainer = maint

# Maybe retrieve an existing object of the same class and ID
existing = self.get_single(cls, obj.id)
# Maybe retrieve an existing object of the same class, ID, and version (if any)
existing = self.get_single(cls, obj.id, version=obj.version)

if existing and (
existing.compare(obj, strict=True) or existing.urn == sdmx.urn.make(obj)
Expand Down

0 comments on commit 578c749

Please sign in to comment.