Skip to content
Snippets Groups Projects
Commit 41d5a049 authored by Ryan Senior's avatar Ryan Senior
Browse files

Fix a top level data/id call

There's a def of a data structure that contains a data/id call. This
can be a problem if the database hasn't been initialized yet. This
commit wraps it in a thunk to ensure it happens when the test run, not
when the code is compiled.
parent decaea07
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,7 @@
;;; | DASHBOARDS |
;;; +----------------------------------------------------------------------------------------------------------------+
(def ^:private basic-mbql-query
(defn- basic-mbql-query []
{:database (data/id)
:type :query
:query {:source_table (data/id :venues)
......@@ -157,7 +157,7 @@
{:parameter_mappings (parameter-mappings-for-card-and-field card-or-id field-or-id)}))
(defn- do-with-updated-fields-for-dashboard {:style/indent 1} [options & [f]]
(do-with-updated-fields-for-card (merge {:card {:dataset_query basic-mbql-query}}
(do-with-updated-fields-for-card (merge {:card {:dataset_query (basic-mbql-query)}}
options)
(fn [objects]
(tt/with-temp Dashboard [dash]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment