From 6f4433bdc789b2e65590621ed8af69f331b1fd95 Mon Sep 17 00:00:00 2001 From: ndiezel0 Date: Fri, 11 Sep 2020 13:11:35 +0300 Subject: [PATCH] HG-452: Fix pm_ruleset (#477) * HG-452: Fix pm_ruleset * HG-452: Revert ComputeGlobals * HG-452: Slim down PR * HG-452: Remove compute_globals * HG-452: Remove unneeded reduce_payment_routing_decisions/3 clause --- apps/party_management/src/pm_ruleset.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/party_management/src/pm_ruleset.erl b/apps/party_management/src/pm_ruleset.erl index 744bdff..22caf5c 100644 --- a/apps/party_management/src/pm_ruleset.erl +++ b/apps/party_management/src/pm_ruleset.erl @@ -20,13 +20,14 @@ reduce_payment_routing_ruleset(RuleSet, VS, DomainRevision) -> decisions = reduce_payment_routing_decisions(RuleSet#domain_PaymentRoutingRuleset.decisions, VS, DomainRevision) }. -reduce_payment_routing_decisions({Type, []}, _, _) -> - {Type, []}; reduce_payment_routing_decisions({delegates, Delegates}, VS, Rev) -> reduce_payment_routing_delegates(Delegates, VS, Rev); reduce_payment_routing_decisions({candidates, Candidates}, VS, Rev) -> reduce_payment_routing_candidates(Candidates, VS, Rev). + +reduce_payment_routing_delegates([], _VS, _Rev) -> + {delegates, []}; reduce_payment_routing_delegates([D | Delegates], VS, Rev) -> Predicate = D#domain_PaymentRoutingDelegate.allowed, RuleSetRef = D#domain_PaymentRoutingDelegate.ruleset,