From 1bb84b729615d2f3de15cf4bc57401629bc895c3 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 3 Jun 2021 13:54:52 +0200 Subject: [PATCH] Sendmail rules: Allow 0 days --- src/pretix/plugins/sendmail/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/plugins/sendmail/forms.py b/src/pretix/plugins/sendmail/forms.py index 7390c0292..8694a4fbc 100644 --- a/src/pretix/plugins/sendmail/forms.py +++ b/src/pretix/plugins/sendmail/forms.py @@ -304,7 +304,7 @@ class RuleForm(FormPlaceholderMixin, I18nModelForm): d['date_is_absolute'] = True d['send_offset_days'] = d['send_offset_time'] = None else: - if not (d.get('send_offset_days') and d.get('send_offset_time')): + if not (d.get('send_offset_days') is not None and d.get('send_offset_time') is not None): raise ValidationError(_('Please specify the offset days and time')) d['offset_is_after'] = '_a' in dia d['offset_to_event_end'] = '_e' in dia