Skip to content

Commit

Permalink
try mireq's patch. See django-parler#326
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMeers committed Apr 19, 2024
1 parent 904eacd commit 6bae279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parler/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ def _set_translated_fields(self, language_code=None, **fields):
)
for field, value in model_fields.items():
try:
setattr(translation, field, value)
model_field = parler_meta.model._meta.get_field(field)
model_field.save_form_data(translation, value)
except TypeError:
# TypeError signals a many to many field. We can't set it like the other attributes, so
# add to our own glued variable.
Expand Down

0 comments on commit 6bae279

Please sign in to comment.