Describe the bug
F expression on BigIntField not work
Throws the following error
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'ArithmeticExpression'
CallStack
File "/home/handlers/custom.py", line 97, in on_buy_kalam
await models.Balances.filter(id=1).update(quantity = F('quantity') - 1)
File "/home/.pyenv/versions/3.10.7/lib/python3.10/site-packages/dipdup/models.py", line 428, in _execute
model._set_kwargs(self.update_kwargs)
File "/home/.pyenv/versions/3.10.7/lib/python3.10/site-packages/tortoise/models.py", line 698, in _set_kwargs
setattr(self, key, field_object.to_python_value(value))
File "/home/versions/3.10.7/lib/python3.10/site-packages/tortoise/fields/base.py", line 224, in to_python_value
value = self.field_type(value) # pylint: disable=E1102
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'ArithmeticExpression'
To Reproduce
Model
class Test(Model):
bigInt = fields.BigIntField(default = 0)
Describe the bug F expression on BigIntField not work
Throws the following error
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'ArithmeticExpression'
CallStack
To Reproduce Model
Elsewhere
Expected behavior increment the bigInt field by 1