Skip to content

Fix optional fields being ignored when updating a template (property)

Marcel Konrad requested to merge fix-optional-template-property-update into master

A template (property) consists of required properties (id, label, etc.) and optional properties (placeholder, formatted label, description, etc.). This creates a problem when trying to update a template (property), since we support the functionality of passing null values to indicate that a property should not be updated. If you want to remove an optional property, the pattern of a template property for example, there is no way of telling the api that you want to remove it, since null values will always be ignored (at the top level). This MR changes the implementation for those fields such that they will always be set to the value specified by the client request, and therefore will never be ignored. This is also the intended behaviour of yesterday's MR that introduced updating templates.

Merge request reports