Revised the code in the get_success_url method in TransactionSortFormView in the accounting application.

This commit is contained in:
依瑪貓 2020-08-17 23:23:41 +08:00
parent dec6233d4e
commit 165768deee

View File

@ -932,8 +932,8 @@ class TransactionSortFormView(FormView):
def get_success_url(self) -> str: def get_success_url(self) -> str:
"""Returns the URL on success.""" """Returns the URL on success."""
return self.request.GET.get("r")\ return self.request.GET.get("r")\
or reverse("accounting:home", or reverse("accounting:home",
current_app=self.request.resolver_match.namespace) current_app=self.request.resolver_match.namespace)
@method_decorator(require_GET, name="dispatch") @method_decorator(require_GET, name="dispatch")