From 7a18dc20cecc8811354e37d7ec1b76d52dd6630d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 19 Sep 2023 07:08:35 -0500 Subject: [PATCH] Do not raise error if CORE equity payment not found in rattail --- rattail_corepos/importing/corepos/db.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rattail_corepos/importing/corepos/db.py b/rattail_corepos/importing/corepos/db.py index 62fe759..2b73561 100644 --- a/rattail_corepos/importing/corepos/db.py +++ b/rattail_corepos/importing/corepos/db.py @@ -345,7 +345,11 @@ class MemberEquityPaymentImporter(FromCOREPOS, corepos_importing.model.MemberEqu if len(matches) == 1: return matches[0] - raise NotImplementedError(f"{len(matches)} payments matched for CORE equity: {stock_purchase}") + # TODO: not sure how to handle yet, if last check found more + # than one match. presumably if none were found then it is + # safe to just return none though.. + if matches: + raise NotImplementedError(f"{len(matches)} payments matched for CORE equity: {stock_purchase}") def normalize_host_object(self, stock_purchase):