From e7185a6514ee83802f07ca1f6d2dff615b8fdfed Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 25 Jun 2018 09:39:16 -0400 Subject: [PATCH] Refs #29516 -- Reverted inadvertent change in Model.__init__(). --- django/db/models/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index 8cdd8f3d01..251825991f 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -481,7 +481,7 @@ class Model(metaclass=ModelBase): except (AttributeError, FieldDoesNotExist): pass for kwarg in kwargs: - raise TypeError("%s() got an unexpected keyword argument '%s'" % (cls.__name__, list(kwargs)[0])) + raise TypeError("%s() got an unexpected keyword argument '%s'" % (cls.__name__, kwarg)) super().__init__() post_init.send(sender=cls, instance=self)