diff --git a/generic/forms.py b/generic/forms.py index 0fd89d8d..d59de903 100755 --- a/generic/forms.py +++ b/generic/forms.py @@ -121,7 +121,7 @@ class CidUserForm(ModelForm): def save_m2m(): old_save_m2m() instance.physics_exam.clear() - for case in self.cleaned_data["physics_exam"]: + for physics_exam in self.cleaned_data["physics_exam"]: # We need the id here instance.physics_exam.add(physics_exam.pk)