From 3728a4037d3f26da82b25694671f11a659dcc108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sat, 8 Apr 2023 10:08:48 +0800 Subject: [PATCH] Renamed the UnappliedAccountConverter path converter to NeedOffsetAccountConverter. --- src/accounting/report/__init__.py | 4 ++-- src/accounting/report/converters.py | 2 +- src/accounting/report/views.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/accounting/report/__init__.py b/src/accounting/report/__init__.py index fbe48ba..985f95d 100644 --- a/src/accounting/report/__init__.py +++ b/src/accounting/report/__init__.py @@ -28,10 +28,10 @@ def init_app(app: Flask, url_prefix: str) -> None: :return: None. """ from .converters import PeriodConverter, CurrentAccountConverter, \ - UnappliedAccountConverter + NeedOffsetAccountConverter app.url_map.converters["period"] = PeriodConverter app.url_map.converters["currentAccount"] = CurrentAccountConverter - app.url_map.converters["unappliedAccount"] = UnappliedAccountConverter + app.url_map.converters["needOffsetAccount"] = NeedOffsetAccountConverter from .views import bp as report_bp app.register_blueprint(report_bp, url_prefix=url_prefix) diff --git a/src/accounting/report/converters.py b/src/accounting/report/converters.py index 97e22c4..b8ebb86 100644 --- a/src/accounting/report/converters.py +++ b/src/accounting/report/converters.py @@ -79,7 +79,7 @@ class CurrentAccountConverter(BaseConverter): return value.code -class UnappliedAccountConverter(BaseConverter): +class NeedOffsetAccountConverter(BaseConverter): """The converter to convert the unapplied original line item account code from and to the corresponding account in the routes.""" diff --git a/src/accounting/report/views.py b/src/accounting/report/views.py index ee14888..e112250 100644 --- a/src/accounting/report/views.py +++ b/src/accounting/report/views.py @@ -301,7 +301,7 @@ def get_default_unapplied() -> str | Response: return report.html() -@bp.get("unapplied/", endpoint="unapplied") +@bp.get("unapplied/", endpoint="unapplied") @has_permission(can_view) def get_unapplied(account: Account) -> str | Response: """Returns the unapplied original line items.