diff --git a/the_works/views/home.py b/the_works/views/home.py index 5b2e584..3a6f070 100644 --- a/the_works/views/home.py +++ b/the_works/views/home.py @@ -40,11 +40,11 @@ def search_all(): continue if matchCase: if s in row[0].__getattribute__(column): - hits.append(row[0]._asdict()) + hits.append(row[0].asdict()) break else: if s.lower() in row[0].__getattribute__(column).lower(): - hits.append(row[0]._asdict()) + hits.append(row[0].asdict()) break if hits != []: result[table.__table__.fullname] = hits diff --git a/the_works/views/titelbild.py b/the_works/views/titelbild.py index db378d9..98e6636 100644 --- a/the_works/views/titelbild.py +++ b/the_works/views/titelbild.py @@ -14,7 +14,7 @@ bp = Blueprint("titelbild", __name__) @bp.route("/titelbild") @bp.route("/titelbild/all") def all(): - return render_template("views/titelbild.html", titelbilder=map(lambda t: t._asdict_with_urls(), db.session.scalars(select(Titelbild)))) + return render_template("views/titelbild.html", titelbilder=map(lambda t: t.asdict_with_urls(), db.session.scalars(select(Titelbild)))) @bp.route("/titelbild/image/")