Skip to content

Commit 970dc11

Browse files
authored
fix: handling of empty referrer index (#2474)
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
1 parent a931724 commit 970dc11

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/controlplane/pkg/biz/referrer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ type ReferrerSharedIndexConfig struct {
4848
}
4949

5050
func NewIndexConfig(cfg *conf.ReferrerSharedIndex) (*ReferrerSharedIndexConfig, error) {
51+
// referrer shared index is optional, if not configured, it's disabled
52+
if cfg == nil {
53+
return nil, nil
54+
}
55+
5156
if err := cfg.ValidateOrgs(); err != nil {
5257
return nil, fmt.Errorf("invalid shared index config: %w", err)
5358
}

0 commit comments

Comments
 (0)