Skip to content

Commit

Permalink
[#4330] Add unique constraint to group configs names
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Jul 17, 2024
1 parent b0feb8a commit 89cdff6
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.11 on 2024-07-17 10:57

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("registrations_objects_api", "0020_objecttype_url_to_uuid"),
]

operations = [
migrations.AlterField(
model_name="objectsapigroupconfig",
name="name",
field=models.CharField(
help_text="A recognisable name for this set of Objects APIs.",
max_length=255,
unique=True,
verbose_name="name",
),
),
]
1 change: 1 addition & 0 deletions src/openforms/registrations/contrib/objects_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class ObjectsAPIGroupConfig(models.Model):
_("name"),
max_length=255,
help_text=_("A recognisable name for this set of Objects APIs."),
unique=True,
)
objects_service = models.ForeignKey(
"zgw_consumers.Service",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.11 on 2024-07-17 10:57

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("zgw_apis", "0013_set_zgw_api_group"),
]

operations = [
migrations.AlterField(
model_name="zgwapigroupconfig",
name="name",
field=models.CharField(
help_text="A recognisable name for this set of ZGW APIs.",
max_length=255,
unique=True,
verbose_name="name",
),
),
]
1 change: 1 addition & 0 deletions src/openforms/registrations/contrib/zgw_apis/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class ZGWApiGroupConfig(models.Model):
_("name"),
max_length=255,
help_text=_("A recognisable name for this set of ZGW APIs."),
unique=True,
)
zrc_service = models.ForeignKey(
"zgw_consumers.Service",
Expand Down

0 comments on commit 89cdff6

Please sign in to comment.