Query a boolean field with sqlalchemy

Postgres Model:

class Song(db.Model): id3_parsed = db.Column(db.Boolean, server_default=u'false') 

Executing the following query gives the correct score:

 select count(*) from song where id3_parsed is false; 

But how do I do this with the sqlalchemy flask? This does not work:

 songs = Song.query.filter(Song.id3_parsed == False).all() 
+6
source share
2 answers
 songs = Song.query.filter(Song.id3_parsed.is_(False)).all() 
+22
source

A small footprint. This seems like a bug with Oracle (12.2.x)

0
source

All Articles