Skip to content

Commit

Permalink
Update detail.py
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire authored Jun 30, 2016
1 parent 0c34acc commit 0f3ae9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bakery/views/detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_url(self, obj):
"""
The URL at which the detail page should appear.
"""
if not obj.get_absolute_url():
if not hasattr(obj, 'get_absolute_url') or not obj.get_absolute_url():
raise ImproperlyConfigured("No URL configured. You must either \
set a ``get_absolute_url`` method on the %s model or override the %s view's \
``get_url`` method" % (obj.__class__.__name__, self.__class__.__name__))
Expand Down

0 comments on commit 0f3ae9d

Please sign in to comment.