Dashboards: Add org_id in dashboards query (#61542)

* Add org_id in dashboards query

* Update OrgID

* Remove unused orgid
This commit is contained in:
Selene 2023-01-16 21:59:43 +01:00 committed by GitHub
parent 665f85cd7e
commit 0d70eb18ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -974,6 +974,9 @@ func (d *DashboardStore) GetDashboards(ctx context.Context, query *dashboards.Ge
} else {
session = sess.In("uid", query.DashboardUIDs)
}
if query.OrgID > 0 {
session = sess.Where("org_id = ?", query.OrgID)
}
err := session.Find(&dashboards)
query.Result = dashboards

View File

@ -256,6 +256,7 @@ type GetDashboardTagsQuery struct {
type GetDashboardsQuery struct {
DashboardIDs []int64
DashboardUIDs []string
OrgID int64
Result []*Dashboard
}