From 76a90e655a9265999e3aeba8ff93fcc76b15bba1 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Fri, 24 Mar 2023 07:13:15 +0100 Subject: [PATCH] HOTFIX * fixes bug where float numbers could not be used as input for e.g. buffer radius * supports --- intervention/models/intervention.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intervention/models/intervention.py b/intervention/models/intervention.py index fc8011c..24f5fd2 100644 --- a/intervention/models/intervention.py +++ b/intervention/models/intervention.py @@ -325,7 +325,8 @@ class Intervention(BaseObject, is_ready (bool) : True|False """ now_date = timezone.now().date() - binding_date = self.legal.binding_date + # use current date as fallback if binding_date does not exist --> is_old_entry will fail as we want it for this case + binding_date = self.legal.binding_date or timezone.now().date() is_old_entry = binding_date < LKOMPVZVO_PUBLISH_DATE is_binding_date_ready = binding_date is not None and binding_date <= now_date is_recorded = self.recorded is not None -- 2.38.5