Skip to content

Commit

Permalink
Deduplicate card IDs in query ♠️
Browse files Browse the repository at this point in the history
  • Loading branch information
camsaul committed May 24, 2016
1 parent 17e250f commit f83c12a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/metabase/api/card.clj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
Make sure cards are returned in the same order as CARD-IDS`; `[in card-ids]` won't preserve the order."
[card-ids]
{:pre [(every? integer? card-ids)]}
(let [card-id->card (db/select-id->obj Card, :id [:in card-ids], :archived false)]
(let [card-id->card (db/select-id->obj Card, :id [:in (set card-ids)], :archived false)]
(filter identity (map card-id->card card-ids))))

(defn- cards:recent
Expand Down

0 comments on commit f83c12a

Please sign in to comment.