Skip to content

Commit

Permalink
fix: correcting test failures and various formatting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Jose Leiva Palomo <alejandro.leiva.palomo@ibm.com>
  • Loading branch information
AleJo2995 committed Sep 7, 2023
1 parent deca2f5 commit e6134af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions trestle/core/catalog/catalog_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ def read_additional_content(
param_dict[const.VALUES] = param_dict[const.VALUES] if const.VALUES in param_dict else []
# if profile_values are present, overwrite values with them
if const.PROFILE_VALUES in param_dict:
if not write_mode and '<REPLACE_ME>' in param_dict[const.PROFILE_VALUES]:
param_dict[const.PROFILE_VALUES].remove('<REPLACE_ME>')
param_dict[const.VALUES] = param_dict[const.PROFILE_VALUES
] if param_dict[const.PROFILE_VALUES
] != [] else param_dict[const.VALUES]
if param_dict[const.PROFILE_VALUES] != [] and param_dict[const.PROFILE_VALUES] is not None:
if not write_mode and '<REPLACE_ME>' in param_dict[const.PROFILE_VALUES]:
param_dict[const.PROFILE_VALUES].remove('<REPLACE_ME>')
param_dict[const.VALUES] = param_dict[const.PROFILE_VALUES]
if not write_mode:
param_dict.pop(const.PROFILE_VALUES)
final_param_dict[param_id] = param_dict
Expand Down
1 change: 1 addition & 0 deletions trestle/core/commands/author/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def _replace_modify_set_params(
new_set_params.append(
prof.SetParameter(
param_id=key,
label=param.label,
values=param.values,
select=param.select,
props=param.props
Expand Down

0 comments on commit e6134af

Please sign in to comment.