mirror of
https://github.com/pretix/pretix.git
synced 2026-09-28 18:44:42 +00:00
Extend query filter for missed-state, take two
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ def activate_plugin(apps, schema_editor):
|
||||
|
||||
only_completed_rules = Rule.objects.exclude(event__plugins__icontains="pretix.plugins.sendmail",
|
||||
enabled=False).filter(
|
||||
~Exists(ScheduledMail.objects.filter(rule=OuterRef('pk')).exclude(state='completed'))
|
||||
~Exists(ScheduledMail.objects.filter(rule=OuterRef('pk')).exclude(state__in=['completed', 'missed']))
|
||||
)
|
||||
only_completed_rules.update(enabled=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user