Skip to content
Snippets Groups Projects
Commit 38440129 authored by Cam Saul's avatar Cam Saul Committed by GitHub
Browse files

Merge pull request #5894 from metabase/update-docstring-checker

Fix docstring checker crashes
parents 592170db a11bef31
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,7 @@
#"^metabase\.http-client$"]}
:profiles {:dev {:dependencies [[expectations "2.2.0-beta2"] ; unit tests
[ring/ring-mock "0.3.0"]] ; Library to create mock Ring requests for unit tests
:plugins [[docstring-checker "1.0.0"] ; Check that all public vars have docstrings. Run with 'lein docstring-checker'
:plugins [[docstring-checker "1.0.2"] ; Check that all public vars have docstrings. Run with 'lein docstring-checker'
[jonase/eastwood "0.2.3"
:exclusions [org.clojure/clojure]] ; Linting
[lein-bikeshed "0.4.1"] ; Linting
......
......@@ -24,7 +24,7 @@
(f updated-field-names)
@updated-field-names)))
(def ^:private basic-native-query
(defn- basic-native-query []
{:database (data/id)
:type "native"
:native {:query "SELECT AVG(SUBTOTAL) AS \"Average Price\"\nFROM ORDERS"}})
......@@ -99,7 +99,7 @@
#{"New Field"}
;; create a Card with non-parameterized query
(do-with-updated-fields-for-card {:db {:is_on_demand true}
:card {:dataset_query basic-native-query}
:card {:dataset_query (basic-native-query)}
:field {:name "New Field"}}
(fn [{:keys [table field card]}]
;; now change the query to one that references our Field in a on-demand DB. Field should have updated values
......@@ -120,7 +120,7 @@
#{}
;; create a Card with non-parameterized query
(do-with-updated-fields-for-card {:db {:is_on_demand false}
:card {:dataset_query basic-native-query}}
:card {:dataset_query (basic-native-query)}}
(fn [{:keys [field card]}]
;; now change the query to one that references a Field. Field should not get values since DB is not On-Demand
(db/update! Card (u/get-id card)
......
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