Skip to content

Commit

Permalink
Merge pull request #671 from flairNLP/fix-empty-values-in-xpath-search
Browse files Browse the repository at this point in the history
Fix a bug returning `None` for empty values in `xpath_search`
  • Loading branch information
MaxDall authored Dec 30, 2024
2 parents 6e017d2 + ddbe942 commit e8dbca7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fundus/parser/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def to_original_characters(text: str) -> str:
xml = f"<result{i}>" + node2string(node) + f"</result{i}>"
results.update(replace_keys_in_nested_dict(xmltodict.parse(xml), to_original_characters))

values = list(results.values())
values = list(filter(bool, results.values()))

if scalar:
if not values:
Expand Down

0 comments on commit e8dbca7

Please sign in to comment.