Hello @kartik,
Try to overwrite the save() method of the model, to check for empty values:
class MyModel(models.Model):
my_nullable_string = models.CharField(max_length=15, null=True, blank=True)
def save(self, *args, **kwargs):
if not self.my_nullable_string:
self.my_nullable_string = None
super(MyModel, self).save(*args, **kwargs)
Hope this work!
Thank you!!