[new-aging] replace split->lot->split->lot with split->lot

remove unnecessary call to get earliest-split
This commit is contained in:
Christopher Lam 2020-01-18 22:26:58 +08:00
parent 073e47801d
commit e788480e34

View File

@ -193,7 +193,7 @@ exist but have no suitable transactions."))
;; simpler version of gnc:owner-from-split. must be gncOwnerFree after
;; use! see split-has-owner? above...
(define (split->owner split)
(let* ((lot (xaccSplitGetLot (gnc-lot-get-earliest-split (xaccSplitGetLot split))))
(let* ((lot (xaccSplitGetLot split))
(owner (gncOwnerNew))
(use-lot-owner? (gncOwnerGetOwnerFromLot lot owner)))
(unless use-lot-owner?