From 974455161c51591bc0cd49daffc52e60ffbc2fbc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Wed, 2 Apr 2025 10:25:07 +0200
Subject: [PATCH] REFACTOR: raise Exception when unexpected line is reached

---
 src/linkahead/common/models.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py
index b3acd770..03845143 100644
--- a/src/linkahead/common/models.py
+++ b/src/linkahead/common/models.py
@@ -1767,7 +1767,9 @@ def _parse_value(datatype, value):
                     raise te
 
     # deal with references
-    return value
+    if isinstance(value, Entity):
+        return value
+    raise RuntimeError("This should not be reached")
 
 
 def _log_request(request, xml_body=None):
-- 
GitLab