-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [#246] Add is_standaard_adres for DigitaalAdres
is_standaard_adres=True is unique per soort_digitaal_adres and setting a new default, revokes the other default
- Loading branch information
Showing
4 changed files
with
80 additions
and
1 deletion.
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
30 changes: 30 additions & 0 deletions
30
.../components/klantinteracties/migrations/0022_digitaaladres_is_standaard_adres_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,30 @@ | ||
# Generated by Django 4.2.15 on 2024-10-31 08:27 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("klantinteracties", "0021_alter_digitaaladres_betrokkene"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="digitaaladres", | ||
name="is_standaard_adres", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="Geeft aan of dit digitaal adres het standaard adres is voor het `soort_digitaal_adres`", | ||
verbose_name="Is standaard adres", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="digitaaladres", | ||
constraint=models.UniqueConstraint( | ||
condition=models.Q(("is_standaard_adres", True)), | ||
fields=("partij", "soort_digitaal_adres"), | ||
name="unique_default_per_partij_and_soort", | ||
), | ||
), | ||
] |
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