diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index e23c7dc..a431258 100644
a
|
b
|
class ReverseSingleRelatedObjectDescriptor(object):
|
353 | 353 | |
354 | 354 | def __set__(self, instance, value): |
355 | 355 | if instance is None: |
356 | | raise AttributeError("%s must be accessed via instance" % self._field.name) |
| 356 | raise AttributeError("%s must be accessed via instance" % self.field.name) |
357 | 357 | |
358 | 358 | # If null=True, we can assign null here, but otherwise the value needs |
359 | 359 | # to be an instance of the related class. |