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

Merge branch 'automagic-dashboards-stage1' of github.com:metabase/metabase...

Merge branch 'automagic-dashboards-stage1' of github.com:metabase/metabase into automagic-dashboards-stage1
parents 0370beef a67062bd
Branches
Tags
No related merge requests found
......@@ -50,10 +50,16 @@
(defn- add-filter
[dashcard filter-id field]
(if-let [target (filter-for-card (:card dashcard) field)]
(update dashcard :parameter_mappings conj
{:parameter_id filter-id
:target target})
(if-let [targets (->> (conj (:series dashcard) (:card dashcard))
(keep (fn [card]
(some-> card
(filter-for-card field)
(vector card))))
not-empty)]
(update dashcard :parameter_mappings concat (for [[target card] targets]
{:parameter_id filter-id
:target target
:card_id (:id card)}))
dashcard))
(defn- filter-type
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment