From 93f021e45dad7a045970ac5b4cf94f9e8d727ecf Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 15 Jan 2019 00:23:32 +0100 Subject: [PATCH] Revert and fix 686e9975bc55c26cb217d6690890622b8e18eb01 --- db.py | 2 +- webserver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db.py b/db.py index 8d83c09c..7e897269 100644 --- a/db.py +++ b/db.py @@ -106,7 +106,7 @@ class Mini(object): for connection in chain: start = start.join(connection.mapper.class_) start = start.filter(Royal.id == royal.id) - mini = start.one_or_none() + mini = start.one() return mini diff --git a/webserver.py b/webserver.py index b5487cb1..1acf3e46 100644 --- a/webserver.py +++ b/webserver.py @@ -117,7 +117,7 @@ def page_profile(name: str): for game in db.mini_list: try: data = game.mini_get_single_from_royal(fl_g.session, user) - except errors.NotFoundError(): + except errors.NotFoundError: data = None # TODO: investigate on why instrumentedlists are returned if data is None: