aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils/breadcrumbs.py
diff options
context:
space:
mode:
authorTom Christie2013-05-07 14:11:48 +0100
committerTom Christie2013-05-07 14:11:48 +0100
commitd7c08222f14389b4d61e5ca9032c49b8b917d251 (patch)
tree29b35471d571c9842f9bd62650249ee78213e72d /rest_framework/utils/breadcrumbs.py
parented2cf180c961bb337c5d3ab7e5f74a1539c33ae4 (diff)
downloaddjango-rest-framework-d7c08222f14389b4d61e5ca9032c49b8b917d251.tar.bz2
Fix breadcrumb rendering issue2.3.1
Diffstat (limited to 'rest_framework/utils/breadcrumbs.py')
-rw-r--r--rest_framework/utils/breadcrumbs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/utils/breadcrumbs.py b/rest_framework/utils/breadcrumbs.py
index 28801d09..d51374b0 100644
--- a/rest_framework/utils/breadcrumbs.py
+++ b/rest_framework/utils/breadcrumbs.py
@@ -24,7 +24,8 @@ def get_breadcrumbs(url):
else:
# Check if this is a REST framework view,
# and if so add it to the breadcrumbs
- if issubclass(getattr(view, 'cls', None), APIView):
+ cls = getattr(view, 'cls', None)
+ if cls is not None and issubclass(cls, APIView):
# Don't list the same view twice in a row.
# Probably an optional trailing slash.
if not seen or seen[-1] != view: