You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have a translatable snippet with a ParentalManyToManyField to another model and want it to be synchronized. But when trying to translate this page I get the following exception:
Traceback (most recent call last):
File "/Users/herbert/dev/python/wagtail-localize/wagtail_localize/tests/test_translation_model.py", line 721, in test_parental_many_to_many
translation.save_target()
File "/Users/herbert/dev/python/wagtail-localize/wagtail_localize/models.py", line 1340, in save_target
self.source.create_or_update_translation(
File "/Users/herbert/dev/python/wagtail-localize/wagtail_localize/models.py", line 762, in create_or_update_translation
copy_synchronised_fields(original, translation)
File "/Users/herbert/dev/python/wagtail-localize/wagtail_localize/fields.py", line 296, in copy_synchronised_fields
setattr(target, field.attname, getattr(source, field.attname))
File "/Users/herbert/dev/python/wagtail-localize/venv/lib/python3.9/site-packages/modelcluster/fields.py", line 490, in __set__
manager.set(value)
File "/Users/herbert/dev/python/wagtail-localize/venv/lib/python3.9/site-packages/modelcluster/fields.py", line 424, in set
objs = list(objs)
TypeError: 'DeferringManyRelatedManager' object is not iterable
Hello,
I have a translatable snippet with a
ParentalManyToManyField
to another model and want it to be synchronized. But when trying to translate this page I get the following exception:I have created a quick repro test here:
https://github.com/hpoul/wagtail-localize/blob/64766882587d02b64822e903a21842b3c829e38f/wagtail_localize/test/models.py#L61-L68
and
https://github.com/hpoul/wagtail-localize/blob/64766882587d02b64822e903a21842b3c829e38f/wagtail_localize/tests/test_translation_model.py#L708-L725
and
Am I doing something wrong? Should
ParentalManyToManyField
be supported to be a synchronized field?thanks,
Herbert
The text was updated successfully, but these errors were encountered: