How to do a .where(somecolumn == None/Null/Empty) with Peewee? How to do a .where(somecolumn == None/Null/Empty) with Peewee? flask flask

How to do a .where(somecolumn == None/Null/Empty) with Peewee?


I'm not a peewee expert, but from the documentation (Querying) it looks like you need:

Message.select().where(Message.somecolumn >> None)


It's a possibility:

Message.select().where(Message.somecolumn.is_null(False))

Documentation