IntegrityError while saving a new item to the postgresql db in django? -


Django saves data but ultimately raises an IntegrityAir. If there is an error, why is he saving that data? And I'm sure the specific data has not been violated.

What's going on? Why is this an error? And how can I solve it?

Most likely that there is an area in your model that does not allow zero values ​​and You are trying to add the object without any object to that field.

If you can edit your post and add more details (such as models and traceback) you can expect a better response.


Comments