diff --git a/pycroft/lib/finance/retransfer.py b/pycroft/lib/finance/retransfer.py index e846cc059..653c1ca68 100644 --- a/pycroft/lib/finance/retransfer.py +++ b/pycroft/lib/finance/retransfer.py @@ -3,7 +3,7 @@ from sepaxml import SepaTransfer from sqlalchemy import select -from sqlalchemy.orm import joinedload +from sqlalchemy.orm import joinedload, Session from pycroft import config from pycroft.helpers.utc import ensure_tz @@ -11,7 +11,7 @@ from pycroft.model.finance import BankAccountActivity -def get_activities_to_return() -> Sequence[BankAccountActivity]: +def get_activities_to_return(session: Session) -> Sequence[BankAccountActivity]: statement = ( select(BankAccountActivity) .options(joinedload(BankAccountActivity.bank_account)) @@ -20,7 +20,7 @@ def get_activities_to_return() -> Sequence[BankAccountActivity]: .filter(BankAccountActivity.imported_at < ensure_tz(datetime.utcnow() - timedelta(days=14))) ) - return session.session.scalars(statement).all() + return session.scalars(statement).all() def generate_activities_return_sepaxml(activities: list[BankAccountActivity]) -> bytes: diff --git a/web/templates/finance/bank_account_activities_return.html b/web/templates/finance/bank_account_activities_return.html index 305a99c35..0afcad2f8 100644 --- a/web/templates/finance/bank_account_activities_return.html +++ b/web/templates/finance/bank_account_activities_return.html @@ -1,8 +1,3 @@ -{# -SPDX-FileCopyrightText: 2024 Gregor Düster - -SPDX-License-Identifier: Apache-2.0 -#} {% extends "layout.html" %} {% set page_title = "Unzuordenbare Überweisungen zurücküberweisen" %}