Added the namespace to the get_success_url method of the MyAccountFormView in the Mia core application.

This commit is contained in:
依瑪貓 2020-08-17 22:39:32 +08:00
parent b3e18d547d
commit 8cadb02d2d

View File

@ -351,7 +351,8 @@ class MyAccountFormView(UserFormView):
def get_success_url(self) -> str:
"""Returns the URL on success."""
return reverse("mia_core:my-account")
return reverse("mia_core:my-account",
current_app=self.request.resolver_match.namespace)
def get_object(self) -> Optional[Model]:
"""Finds and returns the current object, or None on a create form."""