From 44d2b52fc8822713e0d7958ec4e9fd920ed071c4 Mon Sep 17 00:00:00 2001 From: thomaswoehlke <thomas.woehlke@gmail.com> Date: Sat, 6 Feb 2021 00:19:51 +0100 Subject: [PATCH] work --- src/covid19/blueprints/common/common_model.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/covid19/blueprints/common/common_model.py b/src/covid19/blueprints/common/common_model.py index 7420fa7f..3c22f9ff 100644 --- a/src/covid19/blueprints/common/common_model.py +++ b/src/covid19/blueprints/common/common_model.py @@ -113,11 +113,15 @@ class CommonDateReported(db.Model): @classmethod def find_by_year_week(cls, year_week): - return db.session.query(cls).filter(cls.year_week == year_week).one_or_none() + return db.session.query(cls)\ + .filter(cls.year_week == year_week)\ + .one_or_none() @classmethod def get_by_year_week(cls, year_week): - return db.session.query(cls).filter(cls.year_week == year_week).one() + return db.session.query(cls)\ + .filter(cls.year_week == year_week)\ + .one() class CommonRegion(db.Model): -- GitLab