Skip to content
Browse files

Code cleanup

  • Loading branch information...
1 parent 502ed8f commit d63a0b517b2a4bdfdf67756f7ef81ceb0cf9ada4 @adaptivelogic adaptivelogic committed Dec 5, 2012
Showing with 1 addition and 5 deletions.
  1. +0 −4 cms/admin/change_list.py
  2. +1 −1 cms/utils/__init__.py
View
4 cms/admin/change_list.py
@@ -34,10 +34,6 @@ def cache_tree_children(queryset):
parent = parents_dict.get(obj.parent_id)
if parent:
parent._cached_children.append(obj)
- else:
- # if there is no parent, we ignore the issue since it might not be
- # visible to the current user
- pass
class CMSChangeList(ChangeList):
View
2 cms/utils/__init__.py
@@ -44,7 +44,7 @@ def get_language_from_request(request, current_page=None):
Return the most obvious language according the request
"""
language = request.REQUEST.get('language', None)
- site_id = current_page and current_page.site_id
+ site_id = current_page.site_id if current_page else None
if language:
if not language in get_language_list(site_id):
language = None

0 comments on commit d63a0b5

Please sign in to comment.
Something went wrong with that request. Please try again.