class Person(Model):
name = fields.TextField(required=True)
type = fields.NumberField(required=True, int_only=True, range=(1, 2))
person = Person.collection.create(name="test", type=1)
person.name = "test2"
person.update() # TypeError: '<' not supported between instances of 'NoneType' and 'int'
Previous fix does not always work.
For example when NumberField has range attribute: