Skip to content

Commit

Permalink
Merge pull request #38 from iankpconcentricsky/master
Browse files Browse the repository at this point in the history
Prevent throwing Django error when menu child references a ContentType w...
  • Loading branch information
krimkus committed Apr 23, 2014
2 parents cd51d1d + 70fc860 commit 1783f51
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client_admin/modules.py
Expand Up @@ -668,8 +668,11 @@ def _sitemap_child(self, item_class, item_id, child_query, context, title=None):

def _menu_child(self, item, child_query, context):
item_dict = {}
if item.content_type:
item_dict = self._sitemap_child(item.content_type.model_class(), item.object_id, child_query, context)
try:
if item.content_type:
item_dict = self._sitemap_child(item.content_type.model_class(), item.object_id, child_query, context)
except ContentType.DoesNotExist:
pass
if child_query:
children = getattr(item, child_query, None)
try:
Expand Down

0 comments on commit 1783f51

Please sign in to comment.