From 74a7de794435274b1d6aa13196ba430b5a60fe8b Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 10 Aug 2022 22:35:40 +0100 Subject: [PATCH] . --- atlas/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atlas/forms.py b/atlas/forms.py index e3a4fd0f..0b80d8c1 100755 --- a/atlas/forms.py +++ b/atlas/forms.py @@ -250,7 +250,7 @@ class CaseForm(ModelForm): # This is populated if we create the case from an exam/collection self.collection = None - if "exams" in kwargs["initial"]: + if kwargs["initial"] is not None and "exams" in kwargs["initial"]: collections = kwargs["initial"].pop("exams") logging.debug(collections)