mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 13:42:15 +08:00
Annotations: Use dashboard uids instead of dashboard ids (#106676)
This commit is contained in:

committed by
GitHub

parent
47f3073ab8
commit
a8886ad5ec
@ -79,6 +79,7 @@ func (r *RepositoryImpl) Find(ctx context.Context, query *annotations.ItemQuery)
|
||||
}
|
||||
|
||||
// Search without dashboard UID filter is expensive, so check without access control first
|
||||
// nolint: staticcheck
|
||||
if query.DashboardID == 0 && query.DashboardUID == "" {
|
||||
// Return early if no annotations found, it's not necessary to perform expensive access control filtering
|
||||
res, err := r.reader.Get(ctx, *query, &accesscontrol.AccessResources{
|
||||
|
Reference in New Issue
Block a user