mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboards: Add org_id in dashboards query (#61542)
* Add org_id in dashboards query * Update OrgID * Remove unused orgid
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -256,6 +256,7 @@ type GetDashboardTagsQuery struct {
|
||||
type GetDashboardsQuery struct {
|
||||
DashboardIDs []int64
|
||||
DashboardUIDs []string
|
||||
OrgID int64
|
||||
Result []*Dashboard
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user