diff --git a/web/blueprints/finance/__init__.py b/web/blueprints/finance/__init__.py index 3882a57dc..b116d243c 100644 --- a/web/blueprints/finance/__init__.py +++ b/web/blueprints/finance/__init__.py @@ -182,7 +182,7 @@ def bank_accounts_list_json() -> ResponseReturnValue: last_imported_at=( str(datetime.date(i)) if (i := bank_account.last_imported_at) is not None - else "nie" + else "-" ), ) for bank_account in get_all_bank_accounts(session) diff --git a/web/blueprints/finance/tables.py b/web/blueprints/finance/tables.py index 8958545db..59c3d7702 100644 --- a/web/blueprints/finance/tables.py +++ b/web/blueprints/finance/tables.py @@ -208,6 +208,12 @@ def toolbar(self) -> HasDunderStr | None: href = url_for(".bank_accounts_create") return button_toolbar(gettext("Neues Bankkonto anlegen"), href) + class Meta: + table_args = { + "data-sort-order": "desc", + "data-sort-name": "last_imported_at", + } + class BankAccountRow(BaseModel): name: str