From fb18feea76cde2ae8a6b43851b709d0ba1440bda Mon Sep 17 00:00:00 2001 From: savik Date: Tue, 10 Aug 2021 12:34:37 +0300 Subject: [PATCH] fixed pitchfork validation --- v2/pkg/protocols/common/generators/generators.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/pkg/protocols/common/generators/generators.go b/v2/pkg/protocols/common/generators/generators.go index b1f721f3..eb313ebb 100644 --- a/v2/pkg/protocols/common/generators/generators.go +++ b/v2/pkg/protocols/common/generators/generators.go @@ -49,10 +49,10 @@ func New(payloads map[string]interface{}, payloadType Type, templatePath string) if payloadType == PitchFork { var totalLength int for v := range compiled { - if totalLength != 0 && totalLength != len(v) { + if totalLength != 0 && totalLength != len(compiled[v]) { return nil, errors.New("pitchfork payloads must be of equal number") } - totalLength = len(v) + totalLength = len(compiled[v]) } } return generator, nil