Skip to content

Commit

Permalink
Try all combinations for other options
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte committed Dec 6, 2024
1 parent 51ad279 commit 4bac8db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/order/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ func runner(cmd *cobra.Command, args []string) error {
}
anyOptions, userOptions := userOptions.SplitByPlanCode(anyOption)
anyFamilies := anyOptions.Families()
userFamilies := userOptions.Families()

optionFilter := func(opts kimsufiorder.EcoItemOptions, o kimsufiorder.EcoItemOption) bool {
defautPriceConfig := kimsufiorder.EcoItemPriceConfig{
Expand All @@ -223,6 +224,10 @@ func runner(cmd *cobra.Command, args []string) error {
return true
}

if !slices.Contains(userFamilies, o.Family) {
return true
}

// Include option if its family is not already included
current := opts.Get(o.Family)
if current == nil {
Expand Down

0 comments on commit 4bac8db

Please sign in to comment.