Merge pull request 'Fixed miscalculation triggering 'Call for shows'' (#161) from I160_Call_for_shows_section_shown_inappropriately into main

Reviewed-on: rho_n/hpr_generator#161
This commit is contained in:
Ken Fallon 2023-08-27 15:44:13 +00:00
commit f87199bd92
3 changed files with 7 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<!--% query_call_for_shows = '
SELECT CASE WHEN COUNT(id) < 7 THEN True ELSE False END AS `request_for_shows`
SELECT CASE WHEN COUNT(id) < 6 THEN True ELSE False END AS `request_for_shows`
FROM eps
WHERE eps.date > NOW() AND eps.date < DATE_ADD(NOW(), INTERVAL 10 DAY)
'
WHERE eps.date > NOW() AND eps.date <= DATE_ADD(NOW(), INTERVAL 10 DAY)
'
%-->

View File

@ -1,6 +1,6 @@
<!--% query_call_for_shows = '
SELECT CASE WHEN COUNT(id) < 7 THEN True ELSE False END AS `request_for_shows`
SELECT CASE WHEN COUNT(id) < 6 THEN True ELSE False END AS `request_for_shows`
FROM eps
WHERE eps.date > date(\'now\') AND eps.date < date(\'now\', \'+10 days\')
'
WHERE eps.date > date(\'now\') AND eps.date <= date(\'now\', \'+10 days\')
'
%-->

View File

@ -1,8 +1,7 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-call_for_shows-${constants.database}.tpl.html" %-->
<!--% MACRO display_call_for_shows BLOCK %-->
<!--% result_call_for_shows = DBI.prepare(query_call_for_shows)
%-->
<!--% result_call_for_shows = DBI.prepare(query_call_for_shows) %-->
<!--% results_call_for_shows = result_call_for_shows.execute().get_all() %-->
<!--% IF results_call_for_shows.0.request_for_shows == 1 %-->
<!--% USE date %-->