Skip to content
Snippets Groups Projects
Commit 16cda104 authored by Simon Belak's avatar Simon Belak
Browse files

correctly extract table_id from adhoc quesions

parent 533fd549
Branches
Tags
No related merge requests found
......@@ -146,7 +146,7 @@
(defn- similar-questions
[card]
(->> (db/select Card
:table_id (:table_id card)
:table_id (qp.util/get-normalized card :table-id)
:archived false)
filter-visible
(rank-by-similarity card)
......@@ -155,7 +155,7 @@
(defn- canonical-metric
[card]
(->> (db/select Metric
:table_id (:table_id card)
:table_id (qp.util/get-normalized card :table-id)
:archived false)
filter-visible
(m/find-first (comp #{(-> card :dataset_query :query :aggregation)}
......@@ -206,7 +206,7 @@
(defmethod related (type Card)
[card]
(let [table (Table (:table_id card))
(let [table (Table (qp.util/get-normalized card :table-id))
similar-questions (similar-questions card)]
{:table table
:metrics (->> table
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment