mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-03-16 22:10:30 +00:00
Merge pull request #201 from akmiller01/master
Patch wagtail hooks to account for unpredictable dict internal table
This commit is contained in:
commit
77a86fb894
1 changed files with 2 additions and 2 deletions
|
|
@ -59,13 +59,13 @@ def return_translation_target_field_rendered_html(request, page_id):
|
|||
# Patch field prefixes from origin field to target field
|
||||
target_field_patched = []
|
||||
for item in origin_field_serialized:
|
||||
patched_item = None
|
||||
patched_item = {'name': None, 'value': None}
|
||||
for att in iteritems(item):
|
||||
target_value = att[1]
|
||||
if att[0] == 'name':
|
||||
target_value = att[1].replace(
|
||||
origin_field_name, target_field_name)
|
||||
patched_item = {"name": target_value}
|
||||
patched_item["name"] = target_value
|
||||
else:
|
||||
patched_item["value"] = att[1]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue