From cb2ac4d1425ea135cd339e99e0366e458d63fbdb Mon Sep 17 00:00:00 2001 From: Cervinko Cera Date: Sun, 3 Apr 2016 23:22:26 +0200 Subject: [PATCH] for for editing Author --- cps/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index 7712535b..5ca3fb24 100755 --- a/cps/web.py +++ b/cps/web.py @@ -667,7 +667,7 @@ def edit_book(book_id): author_id = book.authors[0].id - is_author = db.session.query(db.Authors).filter(db.Authors.name.like('%' + to_save["author_name"].strip() + '%')).first() + is_author = db.session.query(db.Authors).filter(db.Authors.name == to_save["author_name"].strip()).first() if book.authors[0].name not in ("Unknown", "Unbekannt", "", " "): if is_author: book.authors.append(is_author)