Comment 4 for bug 1086333

Revision history for this message
Unmesh Gurjar (unmesh-gurjar) wrote :

I managed to fix the issue without modifying SQLAlchemy code. Calling session.begin( ) before calling the method save( ) and passing it the corresponding session instance fixes the issue. After the fix is in place, the expected exception 'DBDuplicateEntry' is getting raised on adding a duplicate row.

Does this solution sound correct?

PS: The same solution can also be used for similar issues (such as security group creation LP #1093458).