mirror of
https://github.com/valitydev/party-management.git
synced 2024-11-06 01:05:21 +00:00
Fix: Reduce combination (any_of, all_of) was not an ordset (#26)
* fixed * updated workflow version
This commit is contained in:
parent
1e9f4fd840
commit
bc8368d620
2
.github/workflows/erlang-checks.yaml
vendored
2
.github/workflows/erlang-checks.yaml
vendored
@ -30,7 +30,7 @@ jobs:
|
||||
run:
|
||||
name: Run checks
|
||||
needs: setup
|
||||
uses: valitydev/erlang-workflows/.github/workflows/erlang-parallel-build.yml@v1.0.9
|
||||
uses: valitydev/erlang-workflows/.github/workflows/erlang-parallel-build.yml@v1.0.10
|
||||
with:
|
||||
otp-version: ${{ needs.setup.outputs.otp-version }}
|
||||
rebar-version: ${{ needs.setup.outputs.rebar-version }}
|
||||
|
@ -147,7 +147,7 @@ reduce_combination(_, Fix, [], _, _, []) ->
|
||||
reduce_combination(_, _, [], _, _, [P]) ->
|
||||
P;
|
||||
reduce_combination(Type, _, [], _, _, PAcc) ->
|
||||
{Type, lists:reverse(PAcc)}.
|
||||
{Type, ordsets:from_list(lists:reverse(PAcc))}.
|
||||
|
||||
reduce_condition(C, VS, Rev) ->
|
||||
case pm_condition:test(C, VS, Rev) of
|
||||
|
@ -2397,7 +2397,33 @@ construct_domain_fixture() ->
|
||||
cash_limit =
|
||||
{decisions, [
|
||||
#domain_CashLimitDecision{
|
||||
if_ = {condition, {currency_is, ?cur(<<"RUB">>)}},
|
||||
if_ =
|
||||
{any_of,
|
||||
ordsets:from_list([
|
||||
{any_of,
|
||||
ordsets:from_list([
|
||||
{condition, {currency_is, ?cur(<<"RUB">>)}},
|
||||
{condition,
|
||||
{payment_tool,
|
||||
{bank_card, #domain_BankCardCondition{
|
||||
definition =
|
||||
{payment_system, #domain_PaymentSystemCondition{
|
||||
payment_system_is = #domain_PaymentSystemRef{
|
||||
id = <<"visa">>
|
||||
}
|
||||
}}
|
||||
}}}}
|
||||
])},
|
||||
{all_of,
|
||||
ordsets:from_list([
|
||||
{condition,
|
||||
{cost_in,
|
||||
?cashrng(
|
||||
{inclusive, ?cash(424242, <<"USD">>)},
|
||||
{inclusive, ?cash(424242, <<"USD">>)}
|
||||
)}}
|
||||
])}
|
||||
])},
|
||||
then_ =
|
||||
{value,
|
||||
?cashrng(
|
||||
|
Loading…
Reference in New Issue
Block a user