mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-24 19:29:32 +00:00
Show linked groups on club role form page
This commit is contained in:
1 parent
c4cbcc3560
commit
43eedb274a
2 files changed
+21
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user