Skip to content

Commit

Permalink
fix(bc): sonar warning fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoPascoli committed Jan 31, 2025
1 parent 1618464 commit 11821a9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ def _apply_config(self, study_data: FileStudyTreeConfig) -> OutputTuple:

@override
def _apply(self, study_data: FileStudy, listener: t.Optional[ICommandListener] = None) -> CommandOutput:
try:
self._apply_config(study_data.config)
except NoConstraintError as e:
return CommandOutput(status=False, message=str(e))
command_output, _ = self._apply_config(study_data.config)

if not command_output.status:
return command_output

binding_constraints = study_data.tree.get(["input", "bindingconstraints", "bindingconstraints"])

Expand Down Expand Up @@ -87,7 +87,7 @@ def _apply(self, study_data: FileStudy, listener: t.Optional[ICommandListener] =
removed_groups = old_groups - new_groups
remove_bc_from_scenario_builder(study_data, removed_groups)

return CommandOutput(status=True, message="Binding constraints deleted successfully.")
return command_output

@override
def to_dto(self) -> CommandDTO:
Expand Down

0 comments on commit 11821a9

Please sign in to comment.