diff --git a/tabbycat/adjfeedback/admin.py b/tabbycat/adjfeedback/admin.py index 9d22d15339a..169bc793810 100644 --- a/tabbycat/adjfeedback/admin.py +++ b/tabbycat/adjfeedback/admin.py @@ -40,8 +40,10 @@ class Meta: def clean(self): integer_scale = AdjudicatorFeedbackQuestion.ANSWER_TYPE_INTEGER_SCALE if self.cleaned_data.get('answer_type') == integer_scale: - if not self.cleaned_data.get('min_value') or not self.cleaned_data.get('max_value'): + if self.cleaned_data.get('min_value') is None or self.cleaned_data.get('max_value') is None: raise forms.ValidationError(_("Integer scales must have a minimum and maximum")) + if self.cleaned_data['max_value'] < self.cleaned_data['min_value']: + raise forms.ValidationError(_("Maximum value must be greater than the minimum")) return self.cleaned_data