Bug #9787
Default values of smart class parameters can't be JSON or YAML
Description
While #9673 fixed the issue for overrides, we have the same problem (double typecasting) for default values. So if there's no override for such parameter, we render the default value as true.
Related issues
Associated revisions
Fixes #9787 - correctly typecast default values
JSON and YAML default values were double typecasted, once by active
record and then by value_of_key method.
(cherry picked from commit a2468540b62942a2a9adfb428003d5308df7ab56)
Fixes #9787 - correctly typecast default values
JSON and YAML default values were double typecasted, once by active
record and then by value_of_key method.
(cherry picked from commit a2468540b62942a2a9adfb428003d5308df7ab56)
History
#1
Updated by Marek Hulán almost 8 years ago
- Category set to Parameters
#2
Updated by Marek Hulán almost 8 years ago
- Related to Bug #9673: YAML type casting fails for lookup values in 1.7.3 added
#3
Updated by The Foreman Bot almost 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2238 added
- Pull request deleted (
)
#4
Updated by Martin Hubert almost 8 years ago
Thanks, the patch works for me. :-)
#5
Updated by Marek Hulán almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset a2468540b62942a2a9adfb428003d5308df7ab56.
#6
Updated by Dominic Cleal almost 8 years ago
- Related to Bug #8052: Smart class parameters with ERB snippets are broken for other that String types added
Fixes #9787 - correctly typecast default values
JSON and YAML default values were double typecasted, once by active
record and then by value_of_key method.