diff --git a/aleksis/apps/paweljong/forms.py b/aleksis/apps/paweljong/forms.py index c71b5cb644e7c2e82fa6cd8ae7bf9d8afc5d6d98..0a24683b1a136fd672bd76a4ff86703123a807f6 100644 --- a/aleksis/apps/paweljong/forms.py +++ b/aleksis/apps/paweljong/forms.py @@ -8,7 +8,7 @@ from django_select2.forms import ModelSelect2MultipleWidget, ModelSelect2Widget from material import Fieldset, Layout, Row from phonenumber_field.formfields import PhoneNumberField -from aleksis.apps.tezor.models.invoice import Invoice +from aleksis.apps.tezor.models.invoice import InvoiceGroup from aleksis.core.mixins import ExtensibleForm from aleksis.core.models import Group, Person @@ -339,7 +339,6 @@ class RegisterEventFinancial(ExtensibleForm): ) payment_method = forms.ChoiceField( - choices=Invoice.get_variant_choices(), label=_("Payment method"), help_text=_( "Please choose a payment method. " @@ -347,6 +346,13 @@ class RegisterEventFinancial(ExtensibleForm): ), ) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.fields["payment_method"].choices = InvoiceGroup.objects.get( + name="Hack'n'Fun-Veranstaltungen" + ).get_variant_choices() + class Meta: model = EventRegistration fields = ["voucher_code", "donation"]