Bugs item #2870763, was opened at 2009-09-30 07:08
Message generated for change (Settings changed) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2870763&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Postgres
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Oleg Broytman (phd)
Summary: SQLObject doesn't handle psycopg2.IntegrityError
Initial Comment:
SQLObject throws psycopg2.IntegrityError (duplicate key value violates unique constraint "account_username_key") when in fact it should throw sqlobject.dberrors.IntegrityError.
try:
person = Account(username="rafael", password="senha", connection=conn)
person.addContact(Contact(email="ro...@ma...", connection=conn))
person.addContact(Contact(email="ma...@ma...", connection=conn))
except sqlobject.dberrors.IntegrityError, e:
pass
----------------------------------------------------------------------
>Comment By: Oleg Broytman (phd)
Date: 2011-12-14 08:38
Message:
Implemented in commit 4492.
----------------------------------------------------------------------
Comment By: Oleg Broytman (phd)
Date: 2009-10-12 08:39
Message:
Only SQLiteConnection and MySQLConnection currently map DB API exceptions
to sqlobject.dberrors.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2870763&group_id=74338
|