From 1fb9da122aa3a5a9ea3ec09ee7d78fceebabc69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sun, 2 Aug 2020 00:25:39 +0200 Subject: Fix some errors --- kosten/app/model.py | 6 +++--- kosten/app/views/consts.py | 2 +- kosten/templates/macros.jinja | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kosten/app/model.py b/kosten/app/model.py index 4663685..04a41b9 100644 --- a/kosten/app/model.py +++ b/kosten/app/model.py @@ -11,9 +11,9 @@ from . import app db = SQLAlchemy(app) -__all__ = ['db', \ - 'Category', 'SingleExpense', 'ConstExpense', \ - 'CatExpense', 'MonthExpense'] +__all__ = ['db', + 'Category', 'SingleExpense', 'ConstExpense', + 'CatExpense', 'MonthExpense'] Column = db.Column ReqColumn = partial(Column, nullable = False) diff --git a/kosten/app/views/consts.py b/kosten/app/views/consts.py index 3ac5175..65c0e65 100644 --- a/kosten/app/views/consts.py +++ b/kosten/app/views/consts.py @@ -59,7 +59,7 @@ class ConstForm(F.Form): # init prev_list CE = ConstExpense - filter = (CE.next == None) + filter = (CE.next is None) if cur and cur.id is not None: # not empty filter = sql.or_(CE.next == cur, filter) diff --git a/kosten/templates/macros.jinja b/kosten/templates/macros.jinja index d7cd2fc..cf67bca 100644 --- a/kosten/templates/macros.jinja +++ b/kosten/templates/macros.jinja @@ -22,8 +22,8 @@ {{ caller() }} {% else %} {% set style = "" %} - {% if fgcolor: %}{% set style = style ~ " color: " ~ fgcolor %}{% endif %} - {% if bgcolor: %}{% set style = style ~ " background: " ~ bgcolor %}{% endif %} + {% if fgcolor %}{% set style = style ~ " color: " ~ fgcolor %}{% endif %} + {% if bgcolor %}{% set style = style ~ " background: " ~ bgcolor %}{% endif %} <{{tag}} style="{{style}}">{{caller()}} {% endif %} {% endmacro %} -- cgit v1.2.3