﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18480	Inherited model fails to handle blank field properly	Yuval Adam		"I just opened a [http://stackoverflow.com/questions/11070942/null-values-in-django-sub-model stack overflow question] about this, but after digging a bit this is starting to look like a bug.

Take two simple models with inheritance:
{{{
class A(models.Model):
    a = models.IntegerField(blank=True)

class B(A):
    b = models.IntegerField(blank=True)
}}}

And then in runtime:

{{{
>>> A()
<A: A object>
>>> B()
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""django/db/models/base.py"", line 357, in __init__
    setattr(self, field.attname, val)
  File ""django/db/models/fields/related.py"", line 271, in __set__
    (instance._meta.object_name, self.related.get_accessor_name()))
ValueError: Cannot assign None: ""B.b"" does not allow null values.
}}}

There should be absolutely no reason why A() is properly created, while B() should fail.
"	Bug	closed	Database layer (models, ORM)	1.4	Normal	duplicate		navi7	Accepted	0	0	0	0	0	0
