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]:
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user