Removed the unnecessary setting the current usr in the TransactionFormView and AccountFormView in the accounting application.
This commit is contained in:
parent
321165a50f
commit
31c1c7c35a
@ -837,7 +837,6 @@ class TransactionFormView(FormView):
|
||||
"""Fills in the data model from the form."""
|
||||
obj.old_date = obj.date
|
||||
utils.fill_txn_from_post(self.txn_type, obj, form.data)
|
||||
obj.current_user = self.request.user
|
||||
|
||||
def get_object(self) -> Optional[Account]:
|
||||
"""Returns the current object, or None on a create form."""
|
||||
@ -954,12 +953,6 @@ class AccountFormView(FormView):
|
||||
form.account = obj
|
||||
return form
|
||||
|
||||
def fill_model_from_form(self, obj: Account, form: AccountForm) -> None:
|
||||
"""Fills in the data model from the form."""
|
||||
obj.code = form["code"].value()
|
||||
obj.title = form["title"].value()
|
||||
obj.current_user = self.request.user
|
||||
|
||||
def get_object(self) -> Optional[Account]:
|
||||
"""Returns the current object, or None on a create form."""
|
||||
return self.kwargs.get("account")
|
||||
|
Loading…
Reference in New Issue
Block a user