From 697dcc450a63ea2b4e6743dc624f3b3745b0dc8c Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Fri, 11 Oct 2013 12:31:50 +0000 Subject: [PATCH] If an exception is raised earlier in field validation, the position field may not be set when we get to this point and try to retrieve the value of a different field than the one we're processing. Don't cause a new exception in that case. - Legacy-Id: 6416 --- ietf/doc/views_ballot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/doc/views_ballot.py b/ietf/doc/views_ballot.py index 2d3297f39..b33426008 100644 --- a/ietf/doc/views_ballot.py +++ b/ietf/doc/views_ballot.py @@ -103,7 +103,7 @@ class EditPositionForm(forms.Form): def clean_discuss(self): entered_discuss = self.cleaned_data["discuss"] - entered_pos = self.cleaned_data["position"] + entered_pos = self.cleaned_data.get("position", "norecord") if entered_pos.blocking and not entered_discuss: raise forms.ValidationError("You must enter a non-empty discuss") return entered_discuss