diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index a76a912a..7cbc47a2 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7] + python-version: [3.6, 3.7] steps: - uses: actions/checkout@v1 diff --git a/app/dashboard/views/alias_log.py b/app/dashboard/views/alias_log.py index 37911d63..f2ed75d3 100644 --- a/app/dashboard/views/alias_log.py +++ b/app/dashboard/views/alias_log.py @@ -5,7 +5,7 @@ from app.dashboard.base import dashboard_bp from app.extensions import db from app.models import GenEmail, ForwardEmailLog, ForwardEmail -LIMIT = 15 +_LIMIT = 15 class AliasLog: @@ -39,7 +39,9 @@ def alias_log(alias, page_id): return redirect(url_for("dashboard.index")) logs = get_alias_log(gen_email, page_id) - last_page = len(logs) < LIMIT # lightweight pagination without counting all objects + last_page = ( + len(logs) < _LIMIT + ) # lightweight pagination without counting all objects return render_template("dashboard/alias_log.html", **locals()) @@ -51,8 +53,8 @@ def get_alias_log(gen_email: GenEmail, page_id=0): db.session.query(ForwardEmail, ForwardEmailLog) .filter(ForwardEmail.id == ForwardEmailLog.forward_id) .filter(ForwardEmail.gen_email_id == gen_email.id) - .limit(LIMIT) - .offset(page_id * LIMIT) + .limit(_LIMIT) + .offset(page_id * _LIMIT) ) for fe, fel in q: