You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 706, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 235, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 161, in run_endpoint_function
return await dependant.call(**values)
File "/opt/project/app/routers/cabinet/users.py", line 25, in init_data
return await init_data_handler(user)
File "/opt/project/app/handlers/cabinet/users.py", line 31, in init_data_handler
await _get_balances(user)
File "/opt/project/app/handlers/cabinet/users.py", line 23, in _get_balances
result = await Deal.annotate(
File "/usr/local/lib/python3.10/site-packages/tortoise/queryset.py", line 1506, in _execute
lst_values = list(map(listmap, result))
File "/usr/local/lib/python3.10/site-packages/tortoise/queryset.py", line 1505, in <lambda>
listmap = lambda entry: tuple(func(entry[column]) for column, func in columns) # noqa
File "/usr/local/lib/python3.10/site-packages/tortoise/queryset.py", line 1505, in <genexpr>
listmap = lambda entry: tuple(func(entry[column]) for column, func in columns) # noqa
File "/usr/local/lib/python3.10/site-packages/tortoise/fields/base.py", line 225, in to_python_value
self.validate(value)
File "/usr/local/lib/python3.10/site-packages/tortoise/fields/base.py", line 244, in validate
raise ValidationError(f"{self.model_field_name}: {exc}")
tortoise.exceptions.ValidationError: broker_payed_money: Value should be greater or equal to 0
But drop validator MinValueValidator from broker_payed_money avoids this problem.
Query column balance may be negative.
Version 0.19.2, tried 0.20.0
The text was updated successfully, but these errors were encountered:
henadzit
added a commit
to henadzit/tortoise-orm
that referenced
this issue
Oct 23, 2024
The Model
and the query
raises the Exception
But drop validator MinValueValidator from broker_payed_money avoids this problem.
Query column
balance
may be negative.Version 0.19.2, tried 0.20.0
The text was updated successfully, but these errors were encountered: