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