Compare commits

...

1 Commits

Author SHA1 Message Date
Richard Schreiber
fa6f37a201 Add organizer scope when getting all plugins 2025-10-13 14:19:46 +02:00

View File

@@ -29,6 +29,7 @@ from django.apps import AppConfig, apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import gettext_lazy as _
from django_scopes import scope
from packaging.requirements import Requirement
PLUGIN_LEVEL_EVENT = 'event'
@@ -71,7 +72,8 @@ def get_all_plugins(*, event=None, organizer=None) -> List[type]:
continue
elif organizer and hasattr(app, 'is_available'):
if not event_fallback_used:
event_fallback = organizer.events.first()
with scope(organizer=organizer):
event_fallback = organizer.events.first()
event_fallback_used = True
if not event_fallback or not app.is_available(event_fallback):
continue