mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Refactor is_precompiled_letter to model
This commit is contained in:
@@ -522,7 +522,7 @@ def dao_fetch_monthly_historical_usage_by_template_for_service(service_id, year)
|
||||
stat.month = result.month
|
||||
stat.year = result.year
|
||||
stat.count = result.count
|
||||
stat.hidden = result.hidden
|
||||
stat.is_precompiled_letter = result.is_precompiled_letter
|
||||
stats.append(stat)
|
||||
|
||||
month = get_london_month_from_utc_column(Notification.created_at)
|
||||
@@ -534,7 +534,7 @@ def dao_fetch_monthly_historical_usage_by_template_for_service(service_id, year)
|
||||
if fy_start < datetime.now() < fy_end:
|
||||
today_results = db.session.query(
|
||||
Notification.template_id,
|
||||
Template.hidden,
|
||||
Template.is_precompiled_letter,
|
||||
Template.name,
|
||||
Template.template_type,
|
||||
extract('month', month).label('month'),
|
||||
@@ -574,7 +574,7 @@ def dao_fetch_monthly_historical_usage_by_template_for_service(service_id, year)
|
||||
new_stat.month = int(today_result.month)
|
||||
new_stat.year = int(today_result.year)
|
||||
new_stat.count = today_result.count
|
||||
new_stat.hidden = today_result.hidden
|
||||
new_stat.is_precompiled_letter = today_result.is_precompiled_letter
|
||||
stats.append(new_stat)
|
||||
|
||||
return stats
|
||||
|
||||
Reference in New Issue
Block a user