Bug #15155
closedImporting / publishing a CV with a class with a different default for a parameter wrongfully triggers validation and ISE
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1334520
Description of problem:
A new version of a module, with a new default for a parameter seems to trigger Foreman's validation of parameters: the new default is seen as a changed parameter and Foreman errors out with:
ActiveRecord::RecordInvalid: Validation failed: Override must be true to edit the parameter
Version-Release number of selected component (if applicable):
6.2.0 beta SNAP 10
How reproducible:
using hammer proxy import-classes --environment xxx --id xx
Steps to Reproduce:
1. create two environments, with the same simple module with one parameter in each
2. import the first environment
3. change the parameter in the second env and then import it
Actual results:
First import of second environment might(?) be ok, but second import will trigger validation errors like above.
Expected results:
environment with changed module is imported
Additional info:
I tried changing the version of the module to see if that would help to not trigger the validation, but it doesn't
For my simple test case, actually setting override to true for the parameter allowed me to import the environment.