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
The call first() is not added in previous_calls, then it fails.
I guess it must be because the first() is not a method of sqlalchemy as such, i.e. as a query, but it is a method of the same object that returns the filter and returns the first of the list as if it were a slicing (any_list[0])
# sqlalchemy/orm/query.py - line 2799deffirst(self):
ifself._statementisnotNone:
returnself._iter().first()
else:
returnself.limit(1)._iter().first()
Describe the bug
It's fine if
sfwafawfcwafawf
butfirst
:but
first
:To Reproduce
For example:
and
Expected behavior
If i set:
db.query.return_value.filter.return_value.first.return_value = 112
So the result of
db.query().filter().first()
should be112
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: