summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorJoshua Phillips <jphillips@imap.cc>2016-01-21 16:49:40 +0000
committerTim Graham <timograham@gmail.com>2016-01-22 13:27:11 -0500
commit16baec5c8a24ea4bf1bfc27a4c8fea7d0ff4860f (patch)
tree67d6927556a2aff74749ddfd8e43492b4f290feb /django/db
parent4dc74371e3879a1a9eb5fd39702f5c4e70014629 (diff)
Fixed #25910 -- Rejected read-only property names in model constructors.
Diffstat (limited to 'django/db')
-rw-r--r--django/db/models/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 028367d584..333bee0c27 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -435,7 +435,8 @@ class Model(six.with_metaclass(ModelBase)):
for prop in list(kwargs):
try:
if isinstance(getattr(self.__class__, prop), property):
- setattr(self, prop, kwargs.pop(prop))
+ setattr(self, prop, kwargs[prop])
+ del kwargs[prop]
except AttributeError:
pass
if kwargs: