fix most-valuable-cards list from showing duplicates

the duplicates would arise when multiple owned copies differed by
card quality.
This commit is contained in:
Gered 2018-06-16 11:17:48 -04:00
parent 2007380ea1
commit 503b5f3551

View file

@ -406,7 +406,7 @@
(let [online? (boolean online?)
list-id (int list-id)
public-only? (nil? user-id)]
["select c.id, c.name, c.set_code, cp.price
["select distinct c.id, c.name, c.set_code, cp.price
from cards c
join card_prices cp on c.id = cp.card_id
join collection cl on c.id = cl.card_id