Skip to content

Commit aeb31fc

Browse files
Merge pull request #270 from yashsinghcodes/main
Fix: Opensearch index warnings and errors
2 parents 51924cd + 3198994 commit aeb31fc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

db-connector.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6416,6 +6416,13 @@ func GetEnvironments(ctx context.Context, orgId string) ([]Environment, error) {
64166416
hideEnvs := false
64176417
multiEnvLimit := 0
64186418
if project.Environment == "onprem" {
6419+
if orgId == "" {
6420+
if debug {
6421+
log.Printf("[DEBUG] No orgId provided, skipping multi-env license check")
6422+
}
6423+
return environments, nil
6424+
}
6425+
64196426
currentOrg, err := GetOrg(ctx, orgId)
64206427
if err != nil {
64216428
log.Printf("[WARNING] Failed to get current org %s: %v", orgId, err)
@@ -17089,7 +17096,7 @@ func InitOpensearchIndexes() {
1708917096
GetESIndexPrefix("notifications"),
1709017097
GetESIndexPrefix("shuffle_logs"),
1709117098
GetESIndexPrefix("environments"),
17092-
GetESIndexPrefix("notifications"),
17099+
GetESIndexPrefix("org_statistics")
1709317100
}
1709417101

1709517102
customConfig := os.Getenv("OPENSEARCH_INDEX_CONFIG")

0 commit comments

Comments
 (0)