[Answer]-Django Exception Type: IntegrityError Exception Value: NOT NULL constraint failed: video_url.p_id

1👍

I solved it. Just clear:

def save_model(self, request, obj, form, change):
pass
👤Grey

0👍

This question is answered here Not NULL and here Models NULL

In summary , add these fields to your model

You must create a migration, where you will specify default value for a new field, since you don’t want it to be null. If null is not required, simply add null=True and create and run migration.

Leave a comment