Skip to content

Commit

Permalink
Merge pull request #1559 from open-zaak/feature/1558-besluittype-zaak…
Browse files Browse the repository at this point in the history
…typen

✨ [#1558] make besluittype.zaaktypen read-only
  • Loading branch information
annashamray committed Feb 1, 2024
2 parents 4ea3205 + bf5d561 commit 8e68fa6
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 246 deletions.
2 changes: 1 addition & 1 deletion bin/postman_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -x

POSTMAN_TESTS_REF=d13c71796be9360a22f86c98a39fa0352f08dafe
POSTMAN_TESTS_REF=bd2785bd611cd65bd180caf5dbc0b71034ae4653

# These client IDs and secrets are dummy variables that are only used by
# the Docker build in Travis, so they can be public
Expand Down
1 change: 0 additions & 1 deletion src/openzaak/components/catalogi/admin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def construct_besluittypen(
data=imported, context={"request": REQUEST}
)
if deserialized.is_valid():
deserialized.validated_data.pop("zaaktypen")
deserialized.validated_data.pop("informatieobjecttypen")

instance = BesluitType(**deserialized.validated_data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from rest_framework import serializers
from vng_api_common.utils import get_help_text

from ...models import BesluitType, InformatieObjectType, ZaakType
from ...models import BesluitType, InformatieObjectType
from ..validators import (
ConceptUpdateValidator,
GeldigheidValidator,
Expand All @@ -28,7 +28,7 @@ class BesluitTypeSerializer(serializers.HyperlinkedModelSerializer):
many=True,
view_name="zaaktype-detail",
lookup_field="uuid",
queryset=ZaakType.objects.all(),
read_only=True,
help_text=get_help_text("catalogi.BesluitType", "zaaktypen"),
)

Expand Down Expand Up @@ -103,8 +103,7 @@ class Meta:
validators = [
GeldigheidValidator(),
RelationCatalogValidator("informatieobjecttypen"),
RelationCatalogValidator("zaaktypen"),
ConceptUpdateValidator(),
M2MConceptCreateValidator(["zaaktypen", "informatieobjecttypen"]),
M2MConceptUpdateValidator(["zaaktypen", "informatieobjecttypen"]),
M2MConceptCreateValidator(["informatieobjecttypen"]),
M2MConceptUpdateValidator(["informatieobjecttypen"]),
]
2 changes: 1 addition & 1 deletion src/openzaak/components/catalogi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4715,7 +4715,6 @@ components:
BesluitType:
required:
- catalogus
- zaaktypen
- publicatieIndicatie
- informatieobjecttypen
- beginGeldigheid
Expand All @@ -4742,6 +4741,7 @@ components:
description: ZAAKTYPE met ZAAKen die relevant kunnen zijn voor dit BESLUITTYPE
type: string
format: uri
readOnly: true
uniqueItems: true
omschrijving:
title: Omschrijving
Expand Down
2 changes: 1 addition & 1 deletion src/openzaak/components/catalogi/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Objecttype op [GEMMA Online](https://www.gemmaonline.nl/index.php/Rgbz_1.0/doc/o
| --- | --- | --- | --- | --- |
| url | URL-referentie naar dit object. Dit is de unieke identificatie en locatie van dit object. | string | nee | ~~C~~​R​~~U~~~~D~~ |
| catalogus | URL-referentie naar de CATALOGUS waartoe dit BESLUITTYPE behoort. | string | ja | C​R​U​D |
| zaaktypen | ZAAKTYPE met ZAAKen die relevant kunnen zijn voor dit BESLUITTYPE | array | ja | C​R​U​D |
| zaaktypen | ZAAKTYPE met ZAAKen die relevant kunnen zijn voor dit BESLUITTYPE | array | nee | ~~C~~​R​~~U~~~~D~~ |
| omschrijving | Omschrijving van de aard van BESLUITen van het BESLUITTYPE. | string | nee | C​R​U​D |
| omschrijvingGeneriek | Algemeen gehanteerde omschrijving van de aard van BESLUITen van het BESLUITTYPE | string | nee | C​R​U​D |
| besluitcategorie | Typering van de aard van BESLUITen van het BESLUITTYPE. | string | nee | C​R​U​D |
Expand Down
2 changes: 1 addition & 1 deletion src/openzaak/components/catalogi/swagger2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -6125,7 +6125,6 @@
"BesluitType": {
"required": [
"catalogus",
"zaaktypen",
"publicatieIndicatie",
"informatieobjecttypen",
"beginGeldigheid"
Expand Down Expand Up @@ -6155,6 +6154,7 @@
"type": "string",
"format": "uri"
},
"readOnly": true,
"uniqueItems": true
},
"omschrijving": {
Expand Down

0 comments on commit 8e68fa6

Please sign in to comment.