What steps will reproduce the problem?
1.
#create a model with unique constraint.
class Test(models.Model):
name = models.CharField(max_length=100)
class Meta:
unique = 'name'
2.
# insert two row with same name, try to ignore IntegrityError
from django.db import IntegrityError
try:
Test(name='test').save()
Test(name='test').save()
except IntegrityError, e:
pass
What is the expected output? What do you see instead?
It should not raise IntegrityError since we ignored it, but it still raise
IntegrityError, because pyodbc.IntegrityError is not the same exception as
django.db.utils.IntegrityError.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Apologize for my poor english.
Original issue reported on code.google.com by yi.codep...@gmail.com on 1 Dec 2010 at 7:34
Original issue reported on code.google.com by
yi.codep...@gmail.com
on 1 Dec 2010 at 7:34