From 71ba4fecd4df6bbe112e9e292f616ab221b13e3e Mon Sep 17 00:00:00 2001 From: Chris Wesseling Date: Tue, 27 Jan 2026 11:45:32 +0100 Subject: [PATCH] Revert "Merge pull request #215 from maykinmedia/add-ot-linkable-to-zaken-flag" This reverts commit fec7bdbef48c8da72d5be3fcb4d96505a2a1ed10, reversing changes made to 677299e835e6191600cdf70229bc33ddc5e6bebc. --- src/objecttypes/api/serializers.py | 2 -- src/objecttypes/api/v2/openapi.yaml | 10 --------- .../0019_objecttype_linkable_to_zaken.py | 21 ------------------- src/objecttypes/core/models.py | 11 ---------- .../tests/v2/test_objecttype_api.py | 9 +------- 5 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 src/objecttypes/core/migrations/0019_objecttype_linkable_to_zaken.py diff --git a/src/objecttypes/api/serializers.py b/src/objecttypes/api/serializers.py index e4ad3381..cad42435 100644 --- a/src/objecttypes/api/serializers.py +++ b/src/objecttypes/api/serializers.py @@ -110,7 +110,6 @@ class Meta: "providerOrganization", "documentationUrl", "labels", - "linkableToZaken", "createdAt", "modifiedAt", "allowGeometry", @@ -129,7 +128,6 @@ class Meta: "providerOrganization": {"source": "provider_organization"}, "documentationUrl": {"source": "documentation_url"}, "allowGeometry": {"source": "allow_geometry"}, - "linkableToZaken": {"source": "linkable_to_zaken"}, "createdAt": {"source": "created_at", "read_only": True}, "modifiedAt": {"source": "modified_at", "read_only": True}, } diff --git a/src/objecttypes/api/v2/openapi.yaml b/src/objecttypes/api/v2/openapi.yaml index 6169dcfb..042dd5b0 100644 --- a/src/objecttypes/api/v2/openapi.yaml +++ b/src/objecttypes/api/v2/openapi.yaml @@ -606,11 +606,6 @@ components: additionalProperties: type: string description: Key-value pairs of keywords related for the object type - linkableToZaken: - type: boolean - description: |- - Objects of this type can have a link to 1 or more Zaken. - True indicates the lifetime of the object is linked to the lifetime of linked zaken, i.e., when all linked Zaken to an object are archived/destroyed, the object will also be archived/destroyed. createdAt: type: string format: date @@ -822,11 +817,6 @@ components: additionalProperties: type: string description: Key-value pairs of keywords related for the object type - linkableToZaken: - type: boolean - description: |- - Objects of this type can have a link to 1 or more Zaken. - True indicates the lifetime of the object is linked to the lifetime of linked zaken, i.e., when all linked Zaken to an object are archived/destroyed, the object will also be archived/destroyed. createdAt: type: string format: date diff --git a/src/objecttypes/core/migrations/0019_objecttype_linkable_to_zaken.py b/src/objecttypes/core/migrations/0019_objecttype_linkable_to_zaken.py deleted file mode 100644 index d017f19a..00000000 --- a/src/objecttypes/core/migrations/0019_objecttype_linkable_to_zaken.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 5.2.7 on 2025-11-13 14:37 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("core", "0018_auto_20230207_1401"), - ] - - operations = [ - migrations.AddField( - model_name="objecttype", - name="linkable_to_zaken", - field=models.BooleanField( - default=False, - help_text="Objects of this type can have a link to 1 or more Zaken.\nTrue indicates the lifetime of the object is linked to the lifetime of linked zaken, i.e., when all linked Zaken to an object are archived/destroyed, the object will also be archived/destroyed.", - verbose_name="linkable to zaken", - ), - ), - ] diff --git a/src/objecttypes/core/models.py b/src/objecttypes/core/models.py index a027f256..06f8c227 100644 --- a/src/objecttypes/core/models.py +++ b/src/objecttypes/core/models.py @@ -116,17 +116,6 @@ class ObjectType(models.Model): "`geometry` property will raise an error " ), ) - linkable_to_zaken = models.BooleanField( - _("linkable to zaken"), - default=False, - help_text=_( - # TODO Document: how and where these links should be created/maintained - "Objects of this type can have a link to 1 or more Zaken.\n" - "True indicates the lifetime of the object is linked to the lifetime " - "of linked zaken, i.e., when all linked Zaken to an object are " - "archived/destroyed, the object will also be archived/destroyed." - ), - ) objects = ObjectTypeQuerySet.as_manager() diff --git a/src/objecttypes/tests/v2/test_objecttype_api.py b/src/objecttypes/tests/v2/test_objecttype_api.py index fb887815..639d648d 100644 --- a/src/objecttypes/tests/v2/test_objecttype_api.py +++ b/src/objecttypes/tests/v2/test_objecttype_api.py @@ -40,7 +40,6 @@ def test_get_objecttypes(self): "providerOrganization": object_type.provider_organization, "documentationUrl": object_type.documentation_url, "labels": object_type.labels, - "linkableToZaken": False, "createdAt": "2020-01-01", "modifiedAt": "2020-01-01", "allowGeometry": object_type.allow_geometry, @@ -119,7 +118,6 @@ def test_create_objecttype(self): self.assertEqual(object_type.contact_person, "John Smith") self.assertEqual(object_type.contact_email, "John.Smith@objecttypes.nl") self.assertEqual(object_type.source, "tree system") - self.assertFalse(object_type.linkable_to_zaken) self.assertEqual(object_type.update_frequency, UpdateFrequencyChoices.monthly) self.assertEqual(object_type.provider_organization, "tree provider") self.assertEqual(object_type.documentation_url, "http://example.com/doc/trees") @@ -134,11 +132,7 @@ def test_update_objecttype(self): url = reverse("objecttype-detail", args=[object_type.uuid]) response = self.client.patch( - url, - { - "dataClassification": DataClassificationChoices.open, - "linkableToZaken": True, - }, + url, {"dataClassification": DataClassificationChoices.open} ) self.assertEqual(response.status_code, status.HTTP_200_OK) @@ -148,7 +142,6 @@ def test_update_objecttype(self): self.assertEqual( object_type.data_classification, DataClassificationChoices.open ) - self.assertTrue(object_type.linkable_to_zaken) def test_delete_objecttype(self): object_type = ObjectTypeFactory.create()