Skip to content

Commit

Permalink
Forgot an "is None"
Browse files Browse the repository at this point in the history
  • Loading branch information
Crossedfall committed Aug 25, 2023
1 parent 64ccc69 commit 3ab0c26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bapi/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3ab0c26

Please sign in to comment.