clean form promotion

This commit is contained in:
Cayo Puigdefabregas 2024-06-06 13:47:37 +02:00
parent dab7d30a17
commit 8b56dbc05c
1 changed files with 4 additions and 13 deletions

View File

@ -1,14 +1,6 @@
import json
import requests
from django import forms
from django.conf import settings
from django.template.loader import get_template
from django.utils.translation import gettext_lazy as _
from django.core.exceptions import ValidationError
from utils.idhub_ssikit import create_verifiable_presentation
from oidc4vp.models import Organization, Authorization
from promotion.models import Promotion
@ -25,7 +17,7 @@ class WalletForm(forms.Form):
self.fields['organization'].choices = [
(x.id, x.name) for x in Organization.objects.exclude(
domain=settings.DOMAIN
)
)
]
def save(self, commit=True):
@ -51,10 +43,10 @@ class WalletForm(forms.Form):
self.promotion.save()
return self.authorization.authorize()
return
return
class ContractForm(forms.Form):
nif = forms.CharField()
name = forms.CharField()
@ -66,4 +58,3 @@ class ContractForm(forms.Form):
birthday = forms.CharField()
gen = forms.CharField()
lang = forms.CharField()