fix the fully redeemed count
This commit is contained in:
parent
c96f0a7859
commit
8a82f86e64
|
|
@ -339,7 +339,7 @@ module JamRuby
|
|||
def self.stats
|
||||
stats = {}
|
||||
|
||||
result = JamTrackRight.select('count(id) as total, count(CASE WHEN signing_44 THEN 1 ELSE NULL END) + count(CASE WHEN signing_48 THEN 1 ELSE NULL END) as signing_count, count(CASE WHEN redeemed THEN 1 ELSE NULL END) as redeem_count, count(CASE WHEN redeemed_and_fingerprinted THEN 1 ELSE NULL END) as redeemed_and_dl_count').where(is_test_purchase: false).first
|
||||
result = JamTrackRight.select('count(id) as total, count(CASE WHEN signing_44 THEN 1 ELSE NULL END) + count(CASE WHEN signing_48 THEN 1 ELSE NULL END) as signing_count, count(CASE WHEN redeemed THEN 1 ELSE NULL END) as redeem_count, count(last_downloaded_at) as redeemed_and_dl_count').where(is_test_purchase: false).first
|
||||
|
||||
stats['count'] = result['total'].to_i
|
||||
stats['signing_count'] = result['signing_count'].to_i
|
||||
|
|
|
|||
Loading…
Reference in New Issue