From d7c08222f14389b4d61e5ca9032c49b8b917d251 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Tue, 7 May 2013 14:11:48 +0100 Subject: [PATCH] Fix breadcrumb rendering issue --- docs/topics/release-notes.md | 6 ++++++ rest_framework/__init__.py | 2 +- rest_framework/utils/breadcrumbs.py | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/topics/release-notes.md b/docs/topics/release-notes.md index 56ee926c30..14732a0d02 100644 --- a/docs/topics/release-notes.md +++ b/docs/topics/release-notes.md @@ -40,6 +40,12 @@ You can determine your currently installed version using `pip freeze`: ## 2.3.x series +### 2.3.1 + +**Date**: 7th May 2013 + +* Bugfix: Fix breadcrumb rendering issue. + ### 2.3.0 **Date**: 7th May 2013 diff --git a/rest_framework/__init__.py b/rest_framework/__init__.py index 35196c741b..819558b5ae 100644 --- a/rest_framework/__init__.py +++ b/rest_framework/__init__.py @@ -1,4 +1,4 @@ -__version__ = '2.3.0' +__version__ = '2.3.1' VERSION = __version__ # synonym diff --git a/rest_framework/utils/breadcrumbs.py b/rest_framework/utils/breadcrumbs.py index 28801d0977..d51374b0a8 100644 --- a/rest_framework/utils/breadcrumbs.py +++ b/rest_framework/utils/breadcrumbs.py @@ -24,7 +24,8 @@ def breadcrumbs_recursive(url, breadcrumbs_list, prefix, seen): 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: