fix: Do not fill budget line creation formset with already existing objects

This commit is contained in:
sinavir 2025-03-17 17:28:05 +01:00 committed by catvayor
parent 06865f26af
commit 14d9054841
Signed by: lbailly
GPG key ID: CE3E645251AC63F3

View file

@ -224,6 +224,11 @@ class BudgetLineMassCreate(BuroRequiredMixin, FormView):
success_url = reverse_lazy("cof_clubs:club-list") success_url = reverse_lazy("cof_clubs:club-list")
def get_form_kwargs(self):
kwargs = super().get_form_kwargs()
kwargs["queryset"] = ClubBudgetLine.objects.none()
return kwargs
def get_common_form(self): def get_common_form(self):
kwargs = { kwargs = {
"prefix": "common", "prefix": "common",