Provisioning: Allows specifying uid for datasource and use that in derived fields (#23585)
* Add uid to datasource * Fix uid passing when provisioning * Better error handling and Uid column type change * Fix test and strict null error counts * Add backend tests * Add tests * Fix strict null checks * Update test * Improve tests * Update pkg/services/sqlstore/datasource.go Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com> * Variable rename Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -128,7 +128,7 @@ func AddDataSource(c *models.ReqContext, cmd models.AddDataSourceCommand) Respon
|
||||
cmd.OrgId = c.OrgId
|
||||
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
if err == models.ErrDataSourceNameExists {
|
||||
if err == models.ErrDataSourceNameExists || err == models.ErrDataSourceUidExists {
|
||||
return Error(409, err.Error(), err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user