Skip to content

Commit

Permalink
[#4853] Fixed non required fields in registration backends serializers
Browse files Browse the repository at this point in the history
Backport-of: #4924
  • Loading branch information
vaszig authored and sergei-maertens committed Dec 16, 2024
1 parent 6e65195 commit fa35b36
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/openforms/registrations/contrib/demo/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ class DemoOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
extra_line = serializers.CharField(
label=_("Extra print statement"),
required=False,
allow_blank=True,
)
4 changes: 4 additions & 0 deletions src/openforms/registrations/contrib/email/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class EmailOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
"number to the submission in the subject."
),
required=False,
allow_blank=True,
validators=[
DjangoTemplateValidator(backend="openforms.template.openforms_backend")
],
Expand All @@ -60,6 +61,7 @@ class EmailOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
"Subject of the email sent to the registration backend to notify a change in the payment status."
),
required=False,
allow_blank=True,
validators=[
DjangoTemplateValidator(backend="openforms.template.openforms_backend")
],
Expand All @@ -68,6 +70,7 @@ class EmailOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
label=_("email content template HTML"),
help_text=_("Content of the registration email message (as text)."),
required=False,
allow_blank=True,
validators=[
DjangoTemplateValidator(
backend="openforms.template.openforms_backend",
Expand All @@ -79,6 +82,7 @@ class EmailOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
label=_("email content template text"),
help_text=_("Content of the registration email message (as text)."),
required=False,
allow_blank=True,
validators=[
DjangoTemplateValidator(
backend="openforms.template.openforms_backend",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ class MicrosoftGraphOptionsSerializer(
"ID of the drive to use. If left empty, the default drive will be used."
),
required=False,
allow_blank=True,
)
6 changes: 6 additions & 0 deletions src/openforms/registrations/contrib/objects_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ class ObjectsAPIOptionsSerializer(JsonSchemaSerializerMixin, serializers.Seriali
"to be used for the submission report PDF."
),
required=False,
allow_blank=True,
)
informatieobjecttype_submission_csv = serializers.URLField(
label=_("submission report CSV informatieobjecttype"),
Expand All @@ -179,6 +180,7 @@ class ObjectsAPIOptionsSerializer(JsonSchemaSerializerMixin, serializers.Seriali
"to be used for the submission report CSV."
),
required=False,
allow_blank=True,
)
informatieobjecttype_attachment = serializers.URLField(
label=_("attachment informatieobjecttype"),
Expand All @@ -187,13 +189,15 @@ class ObjectsAPIOptionsSerializer(JsonSchemaSerializerMixin, serializers.Seriali
"to be used for the submission attachments."
),
required=False,
allow_blank=True,
)

# V1 only fields:
productaanvraag_type = serializers.CharField(
label=_("productaanvraag type"),
help_text=_("The type of ProductAanvraag."),
required=False,
allow_blank=True,
)
content_json = serializers.CharField(
label=_("JSON content field"),
Expand All @@ -206,6 +210,7 @@ class ObjectsAPIOptionsSerializer(JsonSchemaSerializerMixin, serializers.Seriali
),
],
required=False,
allow_blank=True,
)
payment_status_update_json = serializers.CharField(
label=_("payment status update JSON template"),
Expand All @@ -219,6 +224,7 @@ class ObjectsAPIOptionsSerializer(JsonSchemaSerializerMixin, serializers.Seriali
),
],
required=False,
allow_blank=True,
)

# V2 only fields:
Expand Down
4 changes: 4 additions & 0 deletions src/openforms/registrations/contrib/stuf_zds/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,24 @@ class ZaakOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
)
zds_zaaktype_omschrijving = serializers.CharField(
required=False,
allow_blank=True,
help_text=_("Zaaktype description for newly created Zaken in StUF-ZDS"),
)

zds_zaaktype_status_code = serializers.CharField(
required=False,
allow_blank=True,
help_text=_("Zaaktype status code for newly created zaken in StUF-ZDS"),
)
zds_zaaktype_status_omschrijving = serializers.CharField(
required=False,
allow_blank=True,
help_text=_("Zaaktype status omschrijving for newly created zaken in StUF-ZDS"),
)

zds_documenttype_omschrijving_inzending = serializers.CharField(
required=True,
allow_blank=True,
help_text=_("Documenttype description for newly created zaken in StUF-ZDS"),
)

Expand Down

0 comments on commit fa35b36

Please sign in to comment.