Fix template syntax errors - use dictionary access job['key'] instead of job.key
This commit is contained in:
1 parent
576ea9edec
commit
54cd87c0f4
3 files changed
+36
-36
No files matched your search
@@ -175,26 +175,26 @@
|
||||
<div class="job-item">
|
||||
<div class="job-header">
|
||||
<div class="job-info">
|
||||
<strong>Job Name:</strong> {{ job.id }}<br>
|
||||
<strong>Processed:</strong> {{ job.timestamp.strftime('%Y-%m-%d %H:%M:%S') if job.timestamp else 'Unknown' }}<br>
|
||||
<strong>Files:</strong> {{ job.file_count }}<br>
|
||||
<strong>Job Name:</strong> {{ job['id'] }}<br>
|
||||
<strong>Processed:</strong> {{ job['timestamp'].strftime('%Y-%m-%d %H:%M:%S') if job['timestamp'] else 'Unknown' }}<br>
|
||||
<strong>Files:</strong> {{ job['file_count'] }}<br>
|
||||
<strong>Status:</strong>
|
||||
{% if job.status == 'completed' %}
|
||||
{% if job['status'] == 'completed' %}
|
||||
<span class="status-completed">Completed</span>
|
||||
{% else %}
|
||||
<span class="status-failed">Failed</span>
|
||||
{% endif %}
|
||||
{% if job.get('error') %}
|
||||
<br><strong>Error:</strong> {{ job.error }}
|
||||
<br><strong>Error:</strong> {{ job['error'] }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="job-actions">
|
||||
{% if job.status == 'completed' %}
|
||||
<form action="{{ url_for('download_job', job_id=job.id) }}" method="get" style="display: inline;">
|
||||
{% if job['status'] == 'completed' %}
|
||||
<form action="{{ url_for('download_job', job_id=job['id']) }}" method="get" style="display: inline;">
|
||||
<button type="submit" class="download-btn">Download ZIP</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form action="{{ url_for('delete_job', job_id=job.id) }}" method="post" style="display: inline;" onsubmit="return confirm('Are you sure you want to delete this job?')">
|
||||
<form action="{{ url_for('delete_job', job_id=job['id']) }}" method="post" style="display: inline;" onsubmit="return confirm('Are you sure you want to delete this job?')">
|
||||
<button type="submit" class="delete-btn">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user