mirror of
https://github.com/Hopiu/wagtail-modeltranslation.git
synced 2026-05-28 08:28:19 +00:00
Add workaround for InlinePanel AttributeError
AttributeError was: no attribute 'panels' when using InlinePanel
This commit is contained in:
parent
8f604e87ab
commit
16d77cacd2
1 changed files with 3 additions and 3 deletions
|
|
@ -349,8 +349,8 @@ class TranslationMixin(object):
|
|||
|
||||
@classmethod
|
||||
def _patch_inlinepanel(cls, instance, panel):
|
||||
inline_panels = getattr(
|
||||
instance.__class__, panel.relation_name).related.model.panels
|
||||
relation = getattr(instance.__class__, panel.relation_name)
|
||||
inline_panels = getattr(relation.related.model, 'panels', [])
|
||||
try:
|
||||
inline_model_tr_fields = translator.get_options_for_model(
|
||||
getattr(
|
||||
|
|
@ -418,4 +418,4 @@ class TranslationMixin(object):
|
|||
if self.live:
|
||||
return RouteResult(self)
|
||||
else:
|
||||
raise Http404
|
||||
raise Http404
|
||||
|
|
|
|||
Loading…
Reference in a new issue