Skip to content

Resolve "A set request results in error : no changes between"

Description

The nodes along a path of the copied model (which is a copy of the underlying goStruct of the plugin) within the ValidateChange method of a plugin were not properly initialized.

This means if a JSON string was provided that contained a node that was not initialized an error was thrown. But since the ytypes.IgnoreExtraFields option was set, the node was just ignored and no error was thrown.

This was also the cause for the described behavior in #281 (closed)

This change correctly initializes the node at the given path and removes the ytypes.IgnoreExtraFields option.

Related Issue

#281 (closed)

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Closes #281 (closed)

Edited by Malte Bauch

Merge request reports