I am putting an image field in a model called Students. Everything is working fine until I put an image field into the model. I am getting the following even I put blank and null as True. It should work fine. Following is the detail information.
Error
django.db.utils.IntegrityError: NOT NULL constraint failed: new__genius_students.image
This is the model
models.py
class Students(models.Model):
created_by = models.ForeignKey(
User, on_delete=models.SET_NULL, default=1, null=True)
name = models.CharField(max_length=200, null=True)
image = models.ImageField(upload_to='images/', null=True, blank=True)
dob = models.DateField(null=True, verbose_name='Date of Birth')
age = models.IntegerField()
I had tried many things like clearing cache and cookie. But No luck.