From 8b56dbc05c7ae2d12339ddfb67c1c3aed0b12a81 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 6 Jun 2024 13:47:37 +0200 Subject: [PATCH] clean form promotion --- promotion/forms.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/promotion/forms.py b/promotion/forms.py index b9f9e1a..c1e4541 100644 --- a/promotion/forms.py +++ b/promotion/forms.py @@ -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() -