-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💥 [#3283] Make ZGW API group service FKs non-nullable
Left-overs from a django-solo model too (see previous commit), these fields really cannot be empty to do anything useful. This properly sets up the required constraints at the database level and removes confusion in the application code.
- Loading branch information
1 parent
39daf50
commit 3f27cb1
Showing
7 changed files
with
86 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...trations/contrib/zgw_apis/migrations/0018_alter_zgwapigroupconfig_drc_service_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Generated by Django 4.2.17 on 2024-12-12 22:49 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("zgw_consumers", "0022_set_default_service_slug"), | ||
("zgw_apis", "0017_alter_zgwapigroupconfig_identifier"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="zgwapigroupconfig", | ||
name="drc_service", | ||
field=models.ForeignKey( | ||
limit_choices_to={"api_type": "drc"}, | ||
on_delete=django.db.models.deletion.PROTECT, | ||
related_name="zgwset_drc_config", | ||
to="zgw_consumers.service", | ||
verbose_name="Documenten API", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="zgwapigroupconfig", | ||
name="zrc_service", | ||
field=models.ForeignKey( | ||
limit_choices_to={"api_type": "zrc"}, | ||
on_delete=django.db.models.deletion.PROTECT, | ||
related_name="zgwset_zrc_config", | ||
to="zgw_consumers.service", | ||
verbose_name="Zaken API", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="zgwapigroupconfig", | ||
name="ztc_service", | ||
field=models.ForeignKey( | ||
limit_choices_to={"api_type": "ztc"}, | ||
on_delete=django.db.models.deletion.PROTECT, | ||
related_name="zgwset_ztc_config", | ||
to="zgw_consumers.service", | ||
verbose_name="Catalogi API", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters