From 3ab0c265e616848adb222cd72a76f89d078f86af Mon Sep 17 00:00:00 2001 From: Crossedfall Date: Fri, 25 Aug 2023 10:08:34 -0500 Subject: [PATCH] Forgot an "is None" --- src/bapi/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bapi/db.py b/src/bapi/db.py index c1b4b6b..04769c6 100644 --- a/src/bapi/db.py +++ b/src/bapi/db.py @@ -185,7 +185,7 @@ class Book(sqlalchemy_ext.Model): @classmethod def from_id(cls, id): try: - return db_session.query(cls).filter(cls.id == id, cls.deleted is None).one() + return db_session.query(cls).filter(cls.id == id, cls.deleted.is_(None)).one() except NoResultFound: return None