1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2025-02-05 23:03:03 +00:00

Ignore club notes that are used by the BDE for particular events

This commit is contained in:
misterkrafts 2023-04-06 17:57:32 +02:00 committed by www-data
parent c4f128786d
commit 4471307b37

View File

@ -32,7 +32,7 @@ class Command(BaseCommand):
notes = Note.objects.filter( notes = Note.objects.filter(
Q(noteuser__user__memberships__date_end__gte= Q(noteuser__user__memberships__date_end__gte=
date.today() - timedelta(days=int(365.25 * options['add_years']))) date.today() - timedelta(days=int(365.25 * options['add_years'])))
| Q(noteclub__isnull=False), | (Q(noteclub__isnull=False) & ~Q(noteclub__club__name__icontains='- BDE')),
balance__lte=-options["negative_amount"], balance__lte=-options["negative_amount"],
is_active=True, is_active=True,
).order_by('balance').distinct().all() ).order_by('balance').distinct().all()