Skip to content

Commit 49c36bf

Browse files
fixed log
1 parent 3c33d19 commit 49c36bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/services/query/query.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const (
3636
HeaderPanelPluginId = "X-Panel-Plugin-Id"
3737
HeaderQueryGroupID = "X-Query-Group-Id" // mainly useful for finding related queries with query chunking
3838
HeaderFromExpression = "X-Grafana-From-Expr" // used by datasources to identify expression queries
39-
headerCodeRabbitOrg = "X-CodeRabbit-Org-Id" // used by CodeRabbit Org Id use to set Row Level Security to scope queries to org
39+
headerCodeRabbitOrg = "X-CodeRabbit-Org-Id" // used by CodeRabbit Org Id use to set Row Level Security to scope queries to org
4040
)
4141

4242
func ProvideService(
@@ -264,11 +264,11 @@ func (s *ServiceImpl) handleQuerySingleDatasource(ctx context.Context, user iden
264264
codeRabbitOrgId := ""
265265
reqCtx := contexthandler.FromContext(ctx)
266266
if reqCtx != nil && reqCtx.Req != nil {
267-
s.log.Info("CodeRabbitOrgID found in header")
268267
codeRabbitOrgId = reqCtx.Req.Header.Get(headerCodeRabbitOrg)
269268
}
270269

271270
if codeRabbitOrgId != "" {
271+
s.log.Info("CodeRabbitOrgID found in header")
272272
setQuery := s.createScopeToOrgQuery(codeRabbitOrgId, ds, true)
273273
resetQuery := s.createScopeToOrgQuery(codeRabbitOrgId, ds, false)
274274

0 commit comments

Comments
 (0)