From 266dafa4a9f94b4b22e087c131f7407214b94f93 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Tue, 23 Jul 2024 23:50:04 +0800 Subject: [PATCH] add comment --- pkg/services/transactions.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/services/transactions.go b/pkg/services/transactions.go index 5af2db5d..40e55a84 100644 --- a/pkg/services/transactions.go +++ b/pkg/services/transactions.go @@ -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