From 083ac872a94059df230de3bf7e7cb8377cbf8430 Mon Sep 17 00:00:00 2001 From: Richard Hitier Date: Mon, 19 Apr 2021 10:21:31 +0200 Subject: [PATCH] Return period id by static string query filter --- app/db_mgr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/db_mgr.py b/app/db_mgr.py index 3177049..2682360 100644 --- a/app/db_mgr.py +++ b/app/db_mgr.py @@ -207,5 +207,5 @@ def get_current_period(): :return: the id of the period of current day """ # TODO: request on dates as soon as periods are dated - p = Period.query.filter(Period.name == '2021').one_or_none() - return 14 + p = Period.query.filter((Period.name == '2021') | (Period.name == '2021_S1')).one() + return p.id -- libgit2 0.21.2