Renamed the UnappliedAccountConverter path converter to NeedOffsetAccountConverter.

This commit is contained in:
依瑪貓 2023-04-08 10:08:48 +08:00
parent 6eee17d44f
commit 3728a4037d
3 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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."""

View File

@ -301,7 +301,7 @@ def get_default_unapplied() -> str | Response:
return report.html()
@bp.get("unapplied/<unappliedAccount:account>", endpoint="unapplied")
@bp.get("unapplied/<needOffsetAccount:account>", endpoint="unapplied")
@has_permission(can_view)
def get_unapplied(account: Account) -> str | Response:
"""Returns the unapplied original line items.