Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#4853] Fix non required fields in registration backends serializers #4924

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -185,6 +185,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 @@ -193,6 +194,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 @@ -201,13 +203,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 @@ -220,6 +224,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 @@ -233,6 +238,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
Loading