Kaydet (Commit) c86e9b58 authored tarafından Mariusz Felisiak's avatar Mariusz Felisiak Kaydeden (comit) Tim Graham

Removed DeferredAttribute.__init__()'s unused model argument.

Unused since a8a81aae.
üst ab7f4c33
......@@ -17,7 +17,7 @@ class SpatialProxy(DeferredAttribute):
self._field = field
self._klass = klass
self._load_func = load_func or klass
super().__init__(field.attname, klass)
super().__init__(field.attname)
def __get__(self, instance, cls=None):
"""
......
......@@ -719,7 +719,7 @@ class Field(RegisterLookupMixin):
# if you have a classmethod and a field with the same name, then
# such fields can't be deferred (we don't have a check for this).
if not getattr(cls, self.attname, None):
setattr(cls, self.attname, DeferredAttribute(self.attname, cls))
setattr(cls, self.attname, DeferredAttribute(self.attname))
if self.choices:
setattr(cls, 'get_%s_display' % self.name,
partialmethod(cls._get_FIELD_display, field=self))
......
......@@ -115,7 +115,7 @@ class DeferredAttribute:
A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.
"""
def __init__(self, field_name, model):
def __init__(self, field_name):
self.field_name = field_name
def __get__(self, instance, cls=None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment