Skip to content

Commit

Permalink
improved code readability (#7503)
Browse files Browse the repository at this point in the history
Co-authored-by: Nihal <nihal.r@qburst.com>
  • Loading branch information
deepbluesquirrel and nihalrahmanqb committed Feb 13, 2023
1 parent 4d7ed46 commit c7fc2f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions cms/utils/placeholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@
def _get_nodelist(tpl):
if hasattr(tpl, 'template'):
return tpl.template.nodelist
else:
return tpl.nodelist
return tpl.nodelist


def get_context(extend_node):
if engines is not None:
context = Context()
context.template = Template('', origin=extend_node.origin)
return context
else:
return {}
return {}


def get_placeholder_conf(setting, placeholder, template=None, default=None):
Expand Down
3 changes: 1 addition & 2 deletions menus/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ def get_descendants(self):
def get_ancestors(self):
if getattr(self, 'parent', None):
return [self.parent] + self.parent.get_ancestors()
else:
return []
return []

def is_selected(self, request):
node_abs_url = self.get_absolute_url()
Expand Down

0 comments on commit c7fc2f2

Please sign in to comment.