Simplified the get_object method in the UserFormView in the Mia core application.
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user