mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-03-16 22:10:30 +00:00
Fixed related model field for inline panel patching in Django 1.8.
This commit is contained in:
parent
abdaee8f7c
commit
f331ac3643
1 changed files with 5 additions and 1 deletions
|
|
@ -180,7 +180,11 @@ class WagtailTranslator(object):
|
|||
# inline model related_name
|
||||
relation = getattr(self.patched_model, panel.relation_name)
|
||||
|
||||
related_model = relation.rel.related_model
|
||||
try:
|
||||
related_model = relation.rel.related_model
|
||||
except AttributeError:
|
||||
# Django 1.8
|
||||
related_model = relation.related.related_model
|
||||
|
||||
# If the related model is not registered for translation there is nothing
|
||||
# for us to do
|
||||
|
|
|
|||
Loading…
Reference in a new issue