Skip to content

Commit e421745

Browse files
authored
Merge pull request #1374 from rcpch/mbarton/crash-registering
Hotfix for crashing during registration
2 parents 0d20709 + c3ef232 commit e421745

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

epilepsy12/models_folder/case.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,13 @@ def editable(self):
184184
if not hasattr(self, "registration"):
185185
return True
186186

187-
return self.registration.days_remaining_before_submission > 0
187+
days_remaining = self.registration.days_remaining_before_submission
188+
189+
# https://github.com/rcpch/rcpch-audit-engine/issues/1373
190+
if days_remaining is None:
191+
return True
192+
193+
return days_remaining > 0
188194

189195
def save(self, *args, **kwargs) -> None:
190196
# Normalise postcode and update geolocation coordinates.

0 commit comments

Comments
 (0)