Skip to content

Commit

Permalink
Allow 0 as min/max adj feedback range
Browse files Browse the repository at this point in the history
  • Loading branch information
tienne-B committed Nov 29, 2024
1 parent 9d51b9a commit 3725d5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tabbycat/adjfeedback/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ 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"))
return self.cleaned_data

Expand Down

0 comments on commit 3725d5a

Please sign in to comment.