Skip to content

Commit

Permalink
🚧 [#4908] Limit service queryset of json options serializer to ORC ty…
Browse files Browse the repository at this point in the history
…pes only

Only ORC type services are relevant for this plugin
  • Loading branch information
viktorvanwijk committed Dec 20, 2024
1 parent 34ab315 commit 8292d01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/openforms/registrations/contrib/json/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.utils.translation import gettext_lazy as _

from rest_framework import serializers
from zgw_consumers.constants import APITypes
from zgw_consumers.models import Service

from openforms.api.fields import PrimaryKeyRelatedAsChoicesField
Expand All @@ -12,7 +13,7 @@

class JSONOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
service = PrimaryKeyRelatedAsChoicesField(
queryset=Service.objects.all(),
queryset=Service.objects.filter(api_type=APITypes.orc),
label=_("Service"),
help_text=_("Which service to use."),
required=True,
Expand Down

0 comments on commit 8292d01

Please sign in to comment.