Unable to catch SQLAlchemy IntegrityError

前端 未结 0 2012
时光取名叫无心
时光取名叫无心 2020-12-17 18:51

If I try to commit a record to my database and it already exists then I want to use a try/except block to handle it:

from sqlalchemy.exc import IntegrityError         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题