Skip to content
Snippets Groups Projects
Commit 802997a3 authored by Cam Saul's avatar Cam Saul
Browse files

fix add-implicit-fields logic

parent a13b131e
No related branches found
No related tags found
No related merge requests found
......@@ -116,10 +116,11 @@
(defn add-implicit-fields
"Add an implicit `fields` clause to queries with `rows` aggregations."
[{:keys [fields aggregation source_table] :as query}]
[{:keys [fields aggregation breakout source_table] :as query}]
(cond-> query
;; If we're doing a "rows" aggregation with no fields clause add one that will exclude Fields that are supposed to be hidden
;; If we're doing a "rows" aggregation with no breakout or fields clauses add one that will exclude Fields that are supposed to be hidden
(and (= aggregation ["rows"])
(not breakout)
(not fields)) (assoc :fields (sel :many :id Field :table_id source_table, :active true, :preview_display true, :field_type [not= "sensitive"]))))
......
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