models: drop non-nullity constraint ou API clients' OU (#72703)
This commit is contained in:
parent
af77cf8157
commit
16ba28029d
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 2.2.26 on 2022-12-22 09:13
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
import authentic2.a2_rbac.utils
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentic2', '0044_apiclient_ou'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='apiclient',
|
||||
name='ou',
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
default=authentic2.a2_rbac.utils.get_default_ou_pk,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to='a2_rbac.OrganizationalUnit',
|
||||
verbose_name='organizational unit',
|
||||
),
|
||||
),
|
||||
]
|
|
@ -727,6 +727,8 @@ class APIClient(models.Model):
|
|||
swappable=False,
|
||||
on_delete=models.CASCADE,
|
||||
default=get_default_ou_pk,
|
||||
null=True,
|
||||
blank=True,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in New Issue