Skip to content

Commit

Permalink
Update input_error.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora-Olivia-Ammann committed Apr 26, 2024
1 parent b361b02 commit 9b6825c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dsp_tools/commands/excel2json/models/input_error.py
Expand Up @@ -260,16 +260,16 @@ def execute_error_protocol(self) -> str:
class ListSheetProblem:
sheet_name: str
root_problems: dict[str, str]
nodes: list[ListNodeProblem] = field(default_factory=list)
node_problems: list[ListNodeProblem] = field(default_factory=list)

def execute_error_protocol(self) -> str:
msg = [
f"The excel sheet '{self.sheet_name}' has the following problem(s):",
]
if self.root_problems:
msg.extend([f"Field: '{key}', Problem: {value}" for key, value in self.root_problems.items()])
if self.nodes:
msg.extend([problem.execute_error_protocol() for problem in self.nodes])
if self.node_problems:
msg.extend([problem.execute_error_protocol() for problem in self.node_problems])
return separator.join(msg)


Expand Down

0 comments on commit 9b6825c

Please sign in to comment.