mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
Fixed attribute error in an exception message
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ef3c0e06e1
commit
6112223100
@ -116,7 +116,7 @@ class ReverseSingleRelatedObjectDescriptor(object):
|
||||
|
||||
def __get__(self, instance, instance_type=None):
|
||||
if instance is None:
|
||||
raise AttributeError, "%s must be accessed via instance" % self._field.name
|
||||
raise AttributeError, "%s must be accessed via instance" % self.field.name
|
||||
cache_name = self.field.get_cache_name()
|
||||
try:
|
||||
return getattr(instance, cache_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user