Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a super border-edge case with the latest patch.

  • Loading branch information...
commit 5aacde66f04d95291e29f17b26318825f908202d 1 parent 338b67a
@chrisglass chrisglass authored
Showing with 13 additions and 12 deletions.
  1. +13 −12 cms/utils/placeholder.py
View
25 cms/utils/placeholder.py
@@ -13,17 +13,18 @@ def get_placeholder_conf(setting, placeholder, template=None, default=None):
CMS_PLACEHOLDER_CONF['placeholder'], if no template is given only the latter
is checked.
"""
- keys = []
- if template:
- keys.append("%s %s" % (template, placeholder))
- keys.append(placeholder)
- for key in keys:
- conf = settings.CMS_PLACEHOLDER_CONF.get(key)
- if not conf:
- continue
- value = conf.get(setting)
- if value:
- return value
+ if placeholder:
+ keys = []
+ if template:
+ keys.append("%s %s" % (template, placeholder))
+ keys.append(placeholder)
+ for key in keys:
+ conf = settings.CMS_PLACEHOLDER_CONF.get(key)
+ if not conf:
+ continue
+ value = conf.get(setting)
+ if value:
+ return value
return default
def get_page_from_placeholder_if_exists(placeholder):
@@ -79,4 +80,4 @@ def get_copy_languages(self, placeholder, model, fieldname, **kwargs):
q &= ~Q(pk=src.pk)
language_codes = manager.filter(q).values_list('language_code', flat=True).distinct()
- return [(lc, dict(settings.LANGUAGES)[lc]) for lc in language_codes]
+ return [(lc, dict(settings.LANGUAGES)[lc]) for lc in language_codes]
Please sign in to comment.
Something went wrong with that request. Please try again.