CC-6054: live-info-v2 returns future shows without ordering by start time

This commit is contained in:
Albert Santoni 2015-06-08 16:38:17 -04:00
parent 02d49864fa
commit 23dd6d4021
1 changed files with 3 additions and 3 deletions

View File

@ -1157,13 +1157,13 @@ WHERE si.show_id = s.id
AND si.starts >= :timeNow::timestamp - INTERVAL '2 days'
AND si.starts < :timeEnd::timestamp
AND modified_instance != TRUE
ORDER BY
CASE
ORDER BY
CASE
WHEN si.ends > :timeNow::timestamp
AND si.starts < :timeNow::timestamp THEN 1
WHEN si.starts > :timeNow::timestamp THEN 2
ELSE 3
END
END, si.starts
LIMIT :lim
SQL;