Skip to content

Commit b6a6503

Browse files
committed
🏗️ [#726] Update configuration model to use Identificatie instead of URL
1 parent 26a1ca3 commit b6a6503

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Generated by Django 4.2.18 on 2025-03-11 11:18
2+
3+
from django.db import migrations, models
4+
5+
6+
# Make sure the configuration is cleared. This is a change that we
7+
# cannot automatically make, so we make sure that the field is cleared
8+
# so that the health check can flag it.
9+
def clear_zaaktype_config(apps, schema_editor):
10+
ArchiveConfig = apps.get_model("config", "ArchiveConfig")
11+
12+
config = ArchiveConfig.objects.first()
13+
if not config:
14+
return
15+
16+
config.zaaktype = ""
17+
config.save()
18+
19+
20+
class Migration(migrations.Migration):
21+
22+
dependencies = [
23+
("config", "0006_alter_archiveconfig_zaaktypes_short_process"),
24+
]
25+
26+
operations = [
27+
migrations.AlterField(
28+
model_name="archiveconfig",
29+
name="zaaktype",
30+
field=models.CharField(
31+
blank=True,
32+
help_text="The identificatie of the zaaktype to use when creating the case for the destruction list deletion.",
33+
max_length=1000,
34+
verbose_name="zaaktype",
35+
),
36+
),
37+
migrations.RunPython(clear_zaaktype_config, clear_zaaktype_config),
38+
]

backend/src/openarchiefbeheer/config/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class ArchiveConfig(SingletonModel):
2424
blank=True,
2525
help_text=_("Source organisation RSIN"),
2626
)
27-
zaaktype = models.URLField(
27+
zaaktype = models.CharField(
2828
"zaaktype",
2929
blank=True,
3030
max_length=1000,
3131
help_text=_(
32-
"The case type URL to use when creating the case for the destruction list deletion."
32+
"The identificatie of the zaaktype to use when creating the case for the destruction list deletion."
3333
),
3434
)
3535
statustype = models.URLField(

0 commit comments

Comments
 (0)