Skip to content
Snippets Groups Projects
Commit 8cd94946 authored by Tom Robinson's avatar Tom Robinson
Browse files

Merge branch 'reposition_via_dashcard_id' of github.com:metabase/metabase-init...

Merge branch 'reposition_via_dashcard_id' of github.com:metabase/metabase-init into create_dashboard
parents 1472a79c 71e8dd27
Branches
Tags
No related merge requests found
......@@ -88,8 +88,9 @@
:col} ...]}"
[id :as {{:keys [cards]} :body}]
(write-check Dashboard id)
(doseq [{:keys [card_id sizeX sizeY row col]} cards]
(let [{dashcard-id :id} (sel :one [DashboardCard :id] :card_id card_id :dashboard_id id)]
(doseq [{dashcard-id :id :keys [sizeX sizeY row col]} cards]
;; we lookup the dashcard purely to ensure the card is part of the given dashboard
(let [_ (sel :one [DashboardCard :id] :id dashcard-id :dashboard_id id)]
(upd DashboardCard dashcard-id :sizeX sizeX :sizeY sizeY :row row :col col)))
(push-revision :entity Dashboard, :object (Dashboard id))
{:status :ok})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment