Added app_label to the error message when field reconstructing fails.
This commit is contained in:
parent
a06fd092ef
commit
f463789f62
|
@ -102,8 +102,9 @@ class ModelState(object):
|
||||||
try:
|
try:
|
||||||
fields.append((name, field_class(*args, **kwargs)))
|
fields.append((name, field_class(*args, **kwargs)))
|
||||||
except TypeError as e:
|
except TypeError as e:
|
||||||
raise TypeError("Couldn't reconstruct field %s on %s: %s" % (
|
raise TypeError("Couldn't reconstruct field %s on %s.%s: %s" % (
|
||||||
name,
|
name,
|
||||||
|
model._meta.app_label,
|
||||||
model._meta.object_name,
|
model._meta.object_name,
|
||||||
e,
|
e,
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in New Issue