>From alchemy docs I should get None if search is empty, https://docs.sqlalchemy.org/en/14/orm/query.html#sqlalchemy.orm.query.Query.one_or_none
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 -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/6f2c1a69-752d-4565-9c4f-aa1dab23977an%40googlegroups.com.