Simplified the get_object method in the UserFormView in the Mia core application.
This commit is contained in:
parent
12a27ba01e
commit
499b7897ef
@ -291,9 +291,7 @@ class UserFormView(FormView):
|
||||
|
||||
def get_object(self) -> Optional[Model]:
|
||||
"""Returns the current object, or None on a create form."""
|
||||
if "user" in self.kwargs:
|
||||
return self.kwargs["user"]
|
||||
return None
|
||||
return self.kwargs.get("user")
|
||||
|
||||
|
||||
@require_POST
|
||||
|
Loading…
Reference in New Issue
Block a user