Skip to content

Commit

Permalink
Fix parameter_sensitivities checking the values instead of the keys
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelarnauts committed Jun 19, 2024
1 parent 1d52262 commit 8ec8fb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions nipyapi/nifi/models/parameter_group_configuration_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ def parameter_sensitivities(self, parameter_sensitivities):
:type: dict(str, str)
"""
allowed_values = ["SENSITIVE", "NON_SENSITIVE"]
if not set(parameter_sensitivities.keys()).issubset(set(allowed_values)):
if not set(parameter_sensitivities.values()).issubset(set(allowed_values)):
raise ValueError(
"Invalid keys in `parameter_sensitivities` [{0}], must be a subset of [{1}]"
.format(", ".join(map(str, set(parameter_sensitivities.keys())-set(allowed_values))),
"Invalid values in `parameter_sensitivities` [{0}], must be a subset of [{1}]"
.format(", ".join(map(str, set(parameter_sensitivities.values())-set(allowed_values))),
", ".join(map(str, allowed_values)))
)

Expand Down
6 changes: 3 additions & 3 deletions resources/client_gen/swagger_templates/model.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ class {{classname}}(object):
)
{{/isListContainer}}
{{#isMapContainer}}
if not set({{{name}}}.keys()).issubset(set(allowed_values)):
if not set({{{name}}}.values()).issubset(set(allowed_values)):
raise ValueError(
"Invalid keys in `{{{name}}}` [{0}], must be a subset of [{1}]"
.format(", ".join(map(str, set({{{name}}}.keys())-set(allowed_values))),
"Invalid values in `{{{name}}}` [{0}], must be a subset of [{1}]"
.format(", ".join(map(str, set({{{name}}}.values())-set(allowed_values))),
", ".join(map(str, allowed_values)))
)
{{/isMapContainer}}
Expand Down

0 comments on commit 8ec8fb0

Please sign in to comment.