# Support for GET and PUT

* adds full external identifier support for GET and PUT methods on EIV, KOM, EMA and OEK
This commit is contained in:
2026-05-10 10:54:48 +02:00
parent b721e9c51c
commit 3ae0dc0cc1
6 changed files with 25 additions and 19 deletions

View File

@@ -171,6 +171,14 @@ class AbstractModelAPISerializer:
Returns:
"""
# First if there is an external identifier linked to an internal one, so we can continue with the internal
try:
ext_id = ExternalIdentifier.objects.get(external_id=id)
id = ext_id.internal_id
except ObjectDoesNotExist:
# No external id found - let's hope the given id exists internally
pass
obj = self.model.objects.get(
id=id,
deleted__isnull=True,