﻿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
29574	Django Foreign Key Mismatch	josephbiko	nobody	"Django Foreign key's do not track the models DB when the model is inherited from abstract class.


  {{{
class A(Model):
   class Meta:
      abstract = True
class B(A):
   pass
class C(Model):
   fk = foreignkey(B,on_delete=models.CASCADE)
}}}

now model B is in table 1 and C points to table 1.
  {{{
class A(Model):
   pass
class B(A):
   pass
class C(Model):
   fk = foreignkey(B,on_delete=models.CASCADE)
}}}
Now Model B is in table 2 with Model A, however C is still pointing to table 1, which leads to a foreign key mismatch error when you try to add an instance of B
"	Uncategorized	new	Uncategorized	2.1	Normal				Unreviewed	0	0	0	0	0	0
