From 039121e18cf669da01a53ac0e89d167c382fa81c Mon Sep 17 00:00:00 2001 From: Iris Scholten Date: Wed, 14 Feb 2018 13:14:57 -0800 Subject: [PATCH] add organization information to the context --- server/sources.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/sources.go b/server/sources.go index 82081cd29..deac89d1c 100644 --- a/server/sources.go +++ b/server/sources.go @@ -7,6 +7,8 @@ import ( "net/http" "net/url" + "github.com/influxdata/chronograf/organizations" + "github.com/bouk/httprouter" "github.com/influxdata/chronograf" "github.com/influxdata/chronograf/influx" @@ -340,6 +342,7 @@ func (s *Service) HandleNewSources(ctx context.Context, input string) error { return err } + ctx = context.WithValue(ctx, organizations.ContextKey, "default") defaultOrg, err := s.Store.Organizations(ctx).DefaultOrganization(ctx) if err != nil { return err