From 4c6a3689dc2a2afd4e29b126c5f908bdfedd8b08 Mon Sep 17 00:00:00 2001 From: Dimitris Papagiannis Date: Wed, 6 Sep 2023 14:37:58 +0200 Subject: [PATCH] asdfa --- .github/workflows/tests.yaml | 2 +- db.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8b48973..a69d658 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -51,7 +51,7 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - name: Test with pytest run: | - pytest tests -s -v + pytest tests -s -v -k 7 env: # Env vars for pytest POSTGRES_USERNAME: postgres diff --git a/db.py b/db.py index 4ecac71..3f0ad09 100644 --- a/db.py +++ b/db.py @@ -390,14 +390,14 @@ def get( if run_start == run_end: answer = cur.execute( text( - f"SELECT {self.TB_DESCRIPTION_RUNS_SHORT_NOLOGS} FROM {self.TB_NAME_RUNS} " + f"SET TIMEZONE = '{TIMEZONE}'; SELECT {self.TB_DESCRIPTION_RUNS_SHORT_NOLOGS} FROM {self.TB_NAME_RUNS} " + f"WHERE run = {run_start} {postfix} ORDER BY client, id;" ) ).all() else: answer = cur.execute( text( - f"SELECT {self.TB_DESCRIPTION_RUNS_SHORT_NOLOGS} FROM {self.TB_NAME_RUNS} " + f"SET TIMEZONE = '{TIMEZONE}'; SELECT {self.TB_DESCRIPTION_RUNS_SHORT_NOLOGS} FROM {self.TB_NAME_RUNS} " + f"WHERE run BETWEEN {run_start} AND {run_end} {postfix};" ) ).all()