﻿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
17318	'Topic authentication', section 'Storing additional information about users' there is bug in the code	supreet.sethi@…	nobody	"In the example code for creating profile using post_save event of User. The code is written thus
{{{#!python
def create_user_profile(sender, instance, created, **kwargs):
    if created:
        UserProfile.objects.create(user=instance)
}}}
Whereas it should be thus:
{{{#!python
def create_user_profile(sender, instance, created, **kwargs):
    if created:
        UserProfile.objects.create(user=instance).save()
}}}
Otherwise it generates ""IntegrityError: column user_id is not unique"" error. 

"	Bug	closed	Documentation	1.3	Normal	invalid	UserProfile		Unreviewed	0	0	0	0	0	0
