diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2018-01-02 23:54:10 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-01-02 17:54:10 -0500 |
| commit | c86e9b5847bc2853fc6a3fcfbf8daa56786d3210 (patch) | |
| tree | ab14785c1362adaeafd6a3353443845e0ca78b6b | |
| parent | ab7f4c330629f24f006a35729ee0d758711312fa (diff) | |
Removed DeferredAttribute.__init__()'s unused model argument.
Unused since a8a81aae20a81e012fddc24f3ede556501af64a2.
| -rw-r--r-- | django/contrib/gis/db/models/proxy.py | 2 | ||||
| -rw-r--r-- | django/db/models/fields/__init__.py | 2 | ||||
| -rw-r--r-- | django/db/models/query_utils.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/gis/db/models/proxy.py b/django/contrib/gis/db/models/proxy.py index 06d64873d9..282109b725 100644 --- a/django/contrib/gis/db/models/proxy.py +++ b/django/contrib/gis/db/models/proxy.py @@ -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): """ diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 188b5bb907..6ddd8f033a 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -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)) diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py index 62b67e6131..1dcf22fda8 100644 --- a/django/db/models/query_utils.py +++ b/django/db/models/query_utils.py @@ -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): |
