Skip to content
Snippets Groups Projects
Commit 9f8ed91a authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Send a pulse even if count aggregation returns 0

parent 20c2d801
No related branches found
No related tags found
No related merge requests found
......@@ -71,11 +71,7 @@
(let [result (:result card)]
(or (zero? (-> result :row_count))
(= [[nil]]
(-> result :data :rows))
(and (= [["count"]]
(-> card :card :dataset_query :query :aggregation))
(= [[0]]
(-> result :data :rows))))))
(-> result :data :rows)))))
(defn are-all-cards-empty?
"Do none of the cards have any results?"
......
......@@ -390,12 +390,8 @@
(cond
(or (= aggregation :rows)
(contains? #{:pin_map :state :country} (:display card))) nil
(or (zero? (-> data :rows count))
(= [[nil]]
(-> data :rows))
(and (= [[0]]
(-> data :rows))
(= ["count"] aggregation))) :empty
(or (zero? row-count)
(= [[nil]] (-> data :rows))) :empty
(and (= col-count 1)
(= row-count 1)) :scalar
(and (= col-count 2)
......
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