Skip to content

Commit

Permalink
#502 no info when skip_extra_existed is True.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Sep 27, 2023
1 parent 273f409 commit 2f58a68
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arekit/contrib/utils/data/writers/json_opennre.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ def __format_row(row, na_value, text_columns, keep_extra_columns, skip_extra_exi
if key not in formatted_data and key not in text_columns:
formatted_data[key] = value
else:
info = f"key `{key}` is already exist in formatted data "\
f"or a part of the text columns list: {text_columns}"
logger.info(info)
if not skip_extra_existed:
raise Exception(info)
raise Exception(f"key `{key}` is already exist in formatted data "
f"or a part of the text columns list: {text_columns}")

return formatted_data

Expand Down

0 comments on commit 2f58a68

Please sign in to comment.