My tortoise ORM model:
class User(Model):
id = fields.IntField(pk=True)
email = fields.CharField(100, unique=True, index=True)
password = fields.CharField(128)
name = fields.CharField(50)
surname = fields.CharField(50)
The fields can't be null, but when I creating an object with the data like:
User.objects.create(email='', name='', ...)
It still works, and creates objects with empty values. That also works with the orm pydantic schemas.
In Django there's the blank property for that.
How to fix it?