diff --git a/intranet/apps/eighth/forms/admin/activities.py b/intranet/apps/eighth/forms/admin/activities.py index d6d9a6a724b..ac2c45f97b0 100644 --- a/intranet/apps/eighth/forms/admin/activities.py +++ b/intranet/apps/eighth/forms/admin/activities.py @@ -34,13 +34,15 @@ def __init__(self, label="Activity", block=None, sponsor=None, *args, **kwargs): activity_ids = (EighthScheduledActivity.objects .filter(block=block) .filter(sponsoring_filter) - .values_list("activity__id", flat=True)) + .values_list("activity__id", flat=True) + .nocache()) else: activity_ids = (EighthScheduledActivity.objects .exclude(activity__deleted=True) .exclude(cancelled=True) .filter(block=block) - .values_list("activity__id", flat=True)) + .values_list("activity__id", flat=True) + .nocache()) queryset = (EighthActivity.objects.filter(id__in=activity_ids) .order_by("name")) else: @@ -84,12 +86,14 @@ def __init__(self, label="Activities", block=None, *args, **kwargs): .exclude(activity__deleted=True) .exclude(cancelled=True) .filter(block=block) - .values_list("activity__id", flat=True)) + .values_list("activity__id", flat=True) + .nocache()) queryset = (EighthActivity.objects.filter(id__in=activity_ids) .order_by("name")) else: queryset = (EighthActivity.undeleted_objects.all() - .order_by("name")) + .order_by("name") + .nocache()) logger.debug(queryset) self.fields["activities"].queryset = queryset