Skip to content

Commit

Permalink
fix: check if the problem list is not empty before raising of Validat…
Browse files Browse the repository at this point in the history
…ionException
  • Loading branch information
insolor committed May 7, 2024
1 parent cd5204a commit 513fd36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion df_translation_toolkit/convert/objects_po_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def get_translations_from_tag(original_tag: str, translation_tag: str):
translation_parts = translation_parts[1:]

yield from get_translations_from_tag_parts(original_parts, translation_parts)
raise ValidationException(validation_problems) # pass warnings
if validation_problems:
raise ValidationException(validation_problems) # pass warnings


def prepare_dictionary(dictionary: Iterable[tuple[str, str]], errors_file: TextIO) -> Iterable[tuple[str, str]]:
Expand Down

0 comments on commit 513fd36

Please sign in to comment.