mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: do not check for folder in file provisioning (#84822)
provide nil folder service in file provisioning
This commit is contained in:
parent
18eac9df9e
commit
04c9f459ec
@ -663,8 +663,8 @@ func (service *AlertRuleService) ensureRuleNamespace(ctx context.Context, user i
|
||||
return fmt.Errorf("%w: folderUID must be set", models.ErrAlertRuleFailedValidation)
|
||||
}
|
||||
|
||||
if user == nil {
|
||||
// user is nil when this is called during file provisioning,
|
||||
if service.folderService == nil {
|
||||
// folder service is nil when this is called during file provisioning,
|
||||
// which already creates the folder if it does not exist
|
||||
return nil
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ func (ps *ProvisioningServiceImpl) ProvisionAlerting(ctx context.Context) error
|
||||
ruleService := provisioning.NewAlertRuleService(
|
||||
st,
|
||||
st,
|
||||
ps.folderService,
|
||||
nil,
|
||||
ps.dashboardService,
|
||||
ps.quotaService,
|
||||
ps.SQLStore,
|
||||
|
Loading…
Reference in New Issue
Block a user