Skip to content

Commit

Permalink
[#3718] PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
vaszig authored and sergei-maertens committed Mar 13, 2024
1 parent 2603fa8 commit f32dc67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/openforms/forms/api/serializers/form_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,6 @@ def validate(self, attrs):

return attrs

def save(self, **kwargs):
# field 'component_translations' has been deprecated and it's not part of
# the 'form_definition' model anymore. We use it only in the serializer.
if "component_translations" in self.validated_data:
del self.validated_data["component_translations"]

return super().save(**kwargs)


class FormDefinitionDetailSerializer(FormDefinitionSerializer):
used_in = UsedInFormSerializer(
Expand Down
5 changes: 5 additions & 0 deletions src/openforms/forms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ def import_form_data(
deserialized.validated_data["configuration"]
)

# field 'component_translations' has been deprecated and it's not part of
# the 'form_definition' model anymore. We use it only in the serializer.
if "component_translations" in deserialized.validated_data:
del deserialized.validated_data["component_translations"]

if resource == "formLogic":
clear_old_service_fetch_config(deserialized.validated_data)

Expand Down

0 comments on commit f32dc67

Please sign in to comment.