Skip to content

Commit 7dd8f87

Browse files
author
PedroGao
committed
fix: 修复软删除图书,图书仍显示的错误
1 parent 39ebf35 commit 7dd8f87

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/api/v1/book.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_book(id):
2626

2727
@book_api.route('/', methods=['GET'])
2828
def get_books():
29-
books = Book.query.filter_by(soft=False).all()
29+
books = Book.query.filter_by(delete_time=None).all()
3030
if books is None or len(books) < 1:
3131
raise NotFound(msg='没有找到相关书籍')
3232
return jsonify(books)

0 commit comments

Comments
 (0)