﻿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
5102	Allow zero pk inserts in post_syncdb	oggie rob <oz.robharvey@…>	Adrian Holovaty	"In setting up a database, it is nice to allow for pk=0 objects in the database (specifically to deal with non-null foreign keys). Because of indexes, this is possible only when post_syncdb is triggered (and not via fixtures), but since it is a logical data entry it makes sense to allow code entries for it. For example:

{{{
        User.objects.create(id=0, username='', first_name='', last_name='', email='', password='', is_active=False, is_staff=False,
            is_superuser=False, date_joined=datetime(1900,1,1), last_login=datetime(1900,1,1))
}}}

However one line prevents this by using bool(pk_val), which is the same for pk_val is None and pk_val = 0. The patch fixes this and allows for post_syncdb additions of zero pk inserts."		closed	Core (Other)	dev		fixed			Ready for checkin	1	0	0	0	0	0
