fix nullable field

This commit is contained in:
Cayo Puigdefabregas 2023-11-24 18:10:43 +01:00
parent 9e8596f39d
commit b182c86a62
2 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 4.2.5 on 2023-11-24 16:53
# Generated by Django 4.2.5 on 2023-11-24 17:10
from django.conf import settings
from django.db import migrations, models
@ -50,7 +50,7 @@ class Migration(migrations.Migration):
(
'client_id',
models.CharField(
default=oidc4vp.models.set_client_id, max_length=24
default=oidc4vp.models.set_client_id, max_length=24, unique=True
),
),
(

View File

@ -36,8 +36,15 @@ class Organization(models.Model):
This class represent a member of one net trust or federated host
"""
name = models.CharField(max_length=250)
client_id = models.CharField(max_length=24, default=set_client_id)
client_secret = models.CharField(max_length=48, default=set_client_secret)
client_id = models.CharField(
max_length=24,
default=set_client_id,
unique=True
)
client_secret = models.CharField(
max_length=48,
default=set_client_secret
)
response_uri = models.URLField(
help_text=_("Url where to send the verificable presentation"),
max_length=250