flake8 and fixing conditionals

This commit is contained in:
Beverly Nguyen
2025-01-20 14:05:15 -08:00
parent f13595fd90
commit b6b110765a
2 changed files with 6 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ from app import (
service_api_client,
template_statistics_client,
)
from app.formatters import format_date_numeric, format_datetime_numeric, get_time_left
from app.formatters import format_date_numeric, format_datetime_numeric
from app.main import main
from app.main.views.user_profile import set_timezone
from app.statistics_utils import get_formatted_percentage

View File

@@ -27,16 +27,13 @@
<td class="table-field template">{{ job.template_name }}</td>
<td class="table-field time-sent">
{% if job.scheduled_for and not job.processing_finished %}
Scheduled for
{{ job.scheduled_for|format_datetime_table }}
{% else %}
{% if job.processing_finished %}
Sent on {{job.processing_finished|format_datetime_table}}
Scheduled for {{ job.scheduled_for|format_datetime_table }}
{% elif job.processing_finished and not job.statistics|selectattr('status', 'equalto', 'sending')|list %}
Sent on {{ job.processing_finished|format_datetime_table }}
{% elif job.processing_started %}
Sending since {{job.processing_started|format_datetime_table}}
Sending since {{ job.processing_started|format_datetime_table }}
{% else %}
Pending since {{job.created_at|format_datetime_table}}
{% endif %}
Pending since {{ job.created_at|format_datetime_table }}
{% endif %}
</td>
<td class="table-field sender sender-column">{{ job.created_by.name }}</td>