Fix panic in legacy alerting after identity.Requester migration (#74265)

This commit is contained in:
Marcus Efraimsson
2023-09-01 12:30:53 +02:00
committed by GitHub
parent 124f445db0
commit 76d9f46edb

View File

@@ -49,7 +49,7 @@ func (p *Provider) Get(ctx context.Context, pluginID string, user identity.Reque
pCtx := backend.PluginContext{
PluginID: pluginID,
}
if user != nil {
if user != nil && !user.IsNil() {
pCtx.OrgID = user.GetOrgID()
pCtx.User = adapters.BackendUserFromSignedInUser(user)
}
@@ -77,7 +77,7 @@ func (p *Provider) GetWithDataSource(ctx context.Context, pluginID string, user
pCtx := backend.PluginContext{
PluginID: pluginID,
}
if user != nil {
if user != nil && !user.IsNil() {
pCtx.OrgID = user.GetOrgID()
pCtx.User = adapters.BackendUserFromSignedInUser(user)
}