Show linked groups on club role form page

This commit is contained in:
imperosol committed 2026-09-08 11:52:18 +02:00
1 parent c4cbcc3560
commit 43eedb274a
2 files changed
+21

No files matched your search

+7
View File
@@ -479,6 +479,13 @@ class ClubRoleCreateForm(forms.ModelForm):
class ClubRoleBaseFormSet(forms.BaseInlineFormSet):
ordering_widget = forms.HiddenInput()
def __init__(self, *args, queryset=None, **kwargs):
if queryset is None:
queryset = self.model._default_manager
super().__init__(
*args, queryset=queryset.prefetch_related("linked_groups"), **kwargs
)
ClubRoleFormSet = forms.inlineformset_factory(
Club,