﻿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
18599	GenericForeignKey field can't be set on init of model	dpantele	nobody	"If we are trying to set GenericForeignKey to non-saved object during model initialization, it is not set.

For example:

{{{
class A(models.model):
    pass

class B(models.model):
    object_id    = models.PositiveIntegerField()
    content_type = models.ForeignKey(ContentType)
    obj          = generic.GenericForeignKey()

...

a = A()
b = B(obj=a)

b.obj # None
b.obj.save() # 'NoneType' object has no attribute 'save'

}}}"	Bug	closed	contrib.contenttypes	1.4	Normal	fixed		dpantele	Accepted	1	0	0	0	0	0
