Getting Nonetype instead of None on query

29 views
Skip to first unread message

Alexei Kositsin

unread,
Jun 1, 2022, 4:27:40 PM6/1/22
to sqlalchemy
From alchemy docs I should get None if search is empty,

But getting Nonetype instead (a class), why so? 
They are not the same, so the check is not the same, should check type(MyRes) == type(None) instead of simply test for != None..
Missing something?
Thanks

Mike Bayer

unread,
Jun 1, 2022, 5:39:15 PM6/1/22
to noreply-spamdigest via sqlalchemy


On Wed, Jun 1, 2022, at 4:27 PM, Alexei Kositsin wrote:
From alchemy docs I should get None if search is empty,

But getting Nonetype instead (a class), why so? 


no known reason for such a thing to occur.  check that your code is in fact getting such a value and that you haven't altered the Query class or SQLAlchemy's source code.


Reply all
Reply to author
Forward
0 new messages