Removed DeferredAttribute.__init__()'s unused model argument.
Unused since a8a81aae20
.
This commit is contained in:
parent
ab7f4c3306
commit
c86e9b5847
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue