Added back the current user of the object in the fill_model_from_form method in TransactionFormView in the accounting application, since it did not call the parent method to set it.

This commit is contained in:
依瑪貓 2020-08-18 13:33:01 +08:00
parent d1a64f86c3
commit ea9d4601ef

View File

@ -837,6 +837,7 @@ 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."""