Renamed the UnappliedAccountConverter path converter to NeedOffsetAccountConverter.
This commit is contained in:
parent
6eee17d44f
commit
3728a4037d
@ -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)
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user