diff --git a/src/covid19/blueprints/common/common_model.py b/src/covid19/blueprints/common/common_model.py index 7420fa7fea56e3e165482b187f4d6d40f5de04ec..3c22f9fff2ef9add98a514dede9a79a8e9ad54ff 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):