Skip to content

Commit

Permalink
fix: File import has to check the imported values, not the current bo…
Browse files Browse the repository at this point in the history
…ne value (#34)
  • Loading branch information
sveneberth authored Dec 4, 2024
1 parent 22883e0 commit 0469a8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/viur/toolkit/importer/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,19 @@ def handle_entries(changes: int, value: t.Any, lang: str | None = None) -> int:
if bone.languages and isinstance(value, dict):
for lang, val in value.items():
if lang in bone.languages:
if not bone_value.get(lang):
if debug:
logger.debug(f"{bone_name=} | {lang=} | {val=}")

if not val:
continue

if isinstance(val, dict):
val = [val]
changes = handle_entries(changes, val, lang)

else:
if debug:
logger.debug(f"{bone_name=} | {value=}")

if isinstance(value, dict):
value = [value]
Expand Down

0 comments on commit 0469a8d

Please sign in to comment.