[#473] placement: Fix backwards compatibility for copies_number
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/push/pre-commit Pipeline was successful

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-06-27 11:12:01 +03:00
parent 43d263c3d5
commit 0c866f62c5

View file

@ -86,7 +86,7 @@ func NewTraverser(opts ...Option) (*Traverser, error) {
} }
// backward compatibility for scalar `copies_number` // backward compatibility for scalar `copies_number`
if len(cfg.copyNumbers) == 1 { if len(cfg.copyNumbers) == 1 && cfg.copyNumbers[0] != 0 {
cfg.flatSuccess = &cfg.copyNumbers[0] cfg.flatSuccess = &cfg.copyNumbers[0]
} }