Combined the create and store URL, and the edit and update URL of the users to simplify the URL pattern settings, because they are handled by the same view now in the Mia core application application.
This commit is contained in:
@ -274,7 +274,7 @@ class UserFormView(FormView):
|
||||
"""Returns the URL on error."""
|
||||
user = self.get_object()
|
||||
return reverse("mia_core:users.create") if user is None\
|
||||
else reverse("mia_core:users.edit", args=(user,))
|
||||
else reverse("mia_core:users.update", args=(user,))
|
||||
|
||||
def get_object(self) -> Optional[Model]:
|
||||
"""Returns the current object, or None on a create form."""
|
||||
|
Reference in New Issue
Block a user