Skip to content

Commit

Permalink
Use pre-computed value
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmacdonald committed May 1, 2024
1 parent e2e1352 commit 56c22ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/metabase/automagic_dashboards/filters.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
[fields]
(->> fields
(map #(assoc % :interestingness (interestingness %)))
(sort-by interestingness >)
(sort-by :interestingness >)
(partition-by :interestingness)
(mapcat (fn [fields]
(->> fields
Expand Down Expand Up @@ -98,8 +98,8 @@
(some-> fingerprint :global :distinct-count (< 2)))))

(defn add-filters
"Add up to `max-filters` filters to dashboard `dashboard`. Takes an optional argument `dimensions` which is a list of
fields for which to create filters, else it tries to infer by which fields it would be useful to filter."
"Add up to `max-filters` filters to dashboard `dashboard`. The `dimensions` argument is a list of fields for which to
create filters."
[dashboard dimensions max-filters]
(let [fks (when-let [table-ids (not-empty (set (keep (comp :table_id :card)
(:dashcards dashboard))))]
Expand Down

0 comments on commit 56c22ee

Please sign in to comment.