Fix missing import of 'IntegrityError'