db.session.query(ReadBook).filter(ReadBook.card_id == 'xxxxxxx',ReadBook.end_date is None).all()
结果一直为card_id == 'xxxxxxx'的全部集合,查了一下使用is_(None)(或者isnot(None))就可以了
ReadBook.end_date.is_(None)
db.session.query(ReadBook).filter(ReadBook.card_id == 'xxxxxxx',ReadBook.end_date is None).all()
结果一直为card_id == 'xxxxxxx'的全部集合,查了一下使用is_(None)(或者isnot(None))就可以了
ReadBook.end_date.is_(None)