Simplified the get_object method in the AccountFormView in the accounting application.
This commit is contained in:
		| @@ -988,9 +988,7 @@ class AccountFormView(FormView): | |||||||
|  |  | ||||||
|     def get_object(self) -> Optional[Account]: |     def get_object(self) -> Optional[Account]: | ||||||
|         """Returns the current object, or None on a create form.""" |         """Returns the current object, or None on a create form.""" | ||||||
|         if "account" in self.kwargs: |         return self.kwargs.get("account") | ||||||
|             return self.kwargs["account"] |  | ||||||
|         return None |  | ||||||
|  |  | ||||||
|  |  | ||||||
| @require_POST | @require_POST | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user