Skip to content

Commit

Permalink
Fix Email Plugin parent
Browse files Browse the repository at this point in the history
  • Loading branch information
Coperh committed Nov 27, 2024
1 parent d471b57 commit 0925ef6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aldryn_forms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,15 @@ class EmailFieldPlugin(FieldPluginBase):
)

def get_parent_form(self):
parent = self.get_parent()
parent = self.parent
while parent is not None:
if parent.plugin_type in ("FormPlugin", "EmailNotificationForm"):
break
parent = parent.get_parent()
parent = self.parent
return parent

def get_parent_form_action_backend(self):
parent = self.get_parent_form()
parent = self.parent
if parent is not None:
return parent, get_action_backends().get(parent.get_plugin_instance()[0].action_backend)
return None, None
Expand Down

0 comments on commit 0925ef6

Please sign in to comment.