Simplified the get_object method in the AccountFormView in the accounting application.
This commit is contained in:
parent
b52733775c
commit
12a27ba01e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user