diff options
| author | Adam Chainz <me@adamj.eu> | 2016-11-21 00:39:32 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-20 19:39:32 -0500 |
| commit | 74742aa956d9cef0493b57f50f1cb7dc0f987fc6 (patch) | |
| tree | 039cccb32a6ecc0ee87a1fc860d4f6127d2c171f | |
| parent | 9d4246419ca5b913a7a9b05f18e695f10a9fd0fb (diff) | |
Fixed #27512 -- Removed unused code in Model.__init__().
| -rw-r--r-- | django/db/models/base.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/django/db/models/base.py b/django/db/models/base.py index 9364afb278..1096a58b22 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -21,8 +21,7 @@ from django.db.models.constants import LOOKUP_SEP from django.db.models.deletion import CASCADE, Collector from django.db.models.fields import AutoField from django.db.models.fields.related import ( - ForeignObjectRel, ManyToOneRel, OneToOneField, lazy_related_operation, - resolve_relation, + ForeignObjectRel, OneToOneField, lazy_related_operation, resolve_relation, ) from django.db.models.manager import Manager from django.db.models.options import Options @@ -494,9 +493,6 @@ class Model(six.with_metaclass(ModelBase)): continue setattr(self, field.attname, val) kwargs.pop(field.name, None) - # Maintain compatibility with existing calls. - if isinstance(field.remote_field, ManyToOneRel): - kwargs.pop(field.attname, None) # Now we're left with the unprocessed fields that *must* come from # keywords, or default. |
