﻿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
3083	MySQL IntegrityError Exception on object creation	anonymous	nobody	"When two users try to register _simulaneously_ with the same username, they both pass validation (because at that moment nobody of them is registered), but when we do actual user.save(), one of them gets MySQL IntegrityError (Duplicate Key Error). Yes, I can handle it, 
{{{
from MySQLdb import IntegrityError
try:
    user.save()
except IntegrityError:
    errors['username'] = 'User with this username already exists',
}}}
but there is dependence to MySQL. I can't simply do ""except:"", because there can be another trouble, such as no connectivity to database during restart, but user would get confusing message about invalid username. The same thing is with all models."	defect	closed	Database layer (models, ORM)		normal	fixed			Design decision needed	0	0	0	0	0	0
