Skip to content

Commit

Permalink
Added to_number function to misc_utils.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Aug 6, 2024
1 parent 893b333 commit c6cee23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dcicutils/structured_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,12 @@ def _note_issue(self, issues: dict, item: Optional[Union[dict, List[dict]]], gro
issues[group] = []
issues[group].extend(item)

def note_validation_error(self, validation_error: str, schema_name: Optional[str] = None, row_number: Optional[int] = None) -> None:
def note_validation_error(self, validation_error: str,
schema_name: Optional[str] = None, row_number: Optional[int] = None) -> None:
if isinstance(validation_error, str) and validation_error:
if isinstance(schema_name, str) and schema_name:
if isinstance(row_number, int):
src = create_dict(type=schema_name, row=row_number)
src = create_dict(type=schema_name, row=row_number)
else:
src = create_dict(type=schema_name)
else:
Expand Down

0 comments on commit c6cee23

Please sign in to comment.