add comment

This commit is contained in:
MaysWind
2024-07-23 23:50:04 +08:00
parent 579c903398
commit 266dafa4a9
+1
View File
@@ -1553,6 +1553,7 @@ func (s *TransactionService) getAccountModels(sess *xorm.Session, transaction *m
return nil, nil, errs.ErrSourceAccountNotFound
}
// check whether the related account is valid
if transaction.Type == models.TRANSACTION_DB_TYPE_MODIFY_BALANCE {
if transaction.RelatedAccountId != 0 && transaction.RelatedAccountId != transaction.AccountId {
return nil, nil, errs.ErrAccountIdInvalid