Fix 1196: Catch IntegrityError on partial updates