diff --git a/tabbycat/options/preferences.py b/tabbycat/options/preferences.py index fd0328097af..f5a84dc8abf 100644 --- a/tabbycat/options/preferences.py +++ b/tabbycat/options/preferences.py @@ -493,6 +493,15 @@ class ReplyScores(BooleanPreference): default = True +@tournament_preferences_registry.register +class RequireSubstantiveForReply(BooleanPreference): + help_text = _("Whether to limit reply speeches to speakers who gave a constructive speech in the debate") + verbose_name = _("Require reply speaker to have given a substantive speech") + section = debate_rules + name = 'require_substantive_for_reply' + default = True + + @tournament_preferences_registry.register class MotionVetoes(BooleanPreference): help_text = _("Enables the motion veto field on ballots, to track veto statistics") diff --git a/tabbycat/results/forms.py b/tabbycat/results/forms.py index 601d2c6ef54..859dd32f9bd 100644 --- a/tabbycat/results/forms.py +++ b/tabbycat/results/forms.py @@ -507,7 +507,7 @@ def clean_speakers(self, cleaned_data): )) # The reply speaker must have given a substantive speech. - if len(speaker_positions.get(reply_speaker, [])) == 0: + if self.tournament.pref('require_substantive_for_reply') and len(speaker_positions.get(reply_speaker, [])) == 0: self.add_error(self._fieldname_speaker(side, self.reply_position), forms.ValidationError( _("The reply speaker for this team did not give a substantive speech."), code='reply_speaker_not_repeat',