From 599764ef3861f888b70bd2ed63ebfb4ec7b3b13b Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Thu, 26 Oct 2023 07:22:09 +0200 Subject: [PATCH] HOTFIX * fixes bug where detail view of KOM could not be opened anymore --- compensation/models/compensation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compensation/models/compensation.py b/compensation/models/compensation.py index 85ec73b0..f3fd0a9f 100644 --- a/compensation/models/compensation.py +++ b/compensation/models/compensation.py @@ -490,7 +490,11 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin, PikMixin): if self.is_recorded: retval = COMPENSATION_LANIS_LAYER_NAME_RECORDED else: - is_old_entry = self.intervention.legal.binding_date < LKOMPVZVO_PUBLISH_DATE + try: + is_old_entry = self.intervention.legal.binding_date < LKOMPVZVO_PUBLISH_DATE + except TypeError: + is_old_entry = True + if is_old_entry: retval = COMPENSATION_LANIS_LAYER_NAME_UNRECORDED_OLD_ENTRY else: