Skip to content

Commit df8559a

Browse files
authored
Emailfix (#145)
1 parent 5bb9e15 commit df8559a

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

src/hope_country_report/utils/mail.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ def notify_report_completion(report: "ReportConfiguration") -> int:
8484
if state.request:
8585
url = state.request.build_absolute_uri(url)
8686

87+
docs_url = report.get_documents_url()
88+
if state.request:
89+
docs_url = state.request.build_absolute_uri(docs_url)
90+
8791
if config.CATCH_ALL_EMAIL:
8892
recipient_list = [config.CATCH_ALL_EMAIL]
8993
else:
@@ -101,7 +105,7 @@ def notify_report_completion(report: "ReportConfiguration") -> int:
101105
102106
Report {report.title} has been successfully updated/created.
103107
104-
you can view see/download produced documents at {report.get_documents_url()}
108+
You can view/download produced documents at {docs_url}
105109
106110
107111
Kind regards,
@@ -114,6 +118,7 @@ def notify_report_completion(report: "ReportConfiguration") -> int:
114118
"report": {
115119
"title": report.title,
116120
"url": url,
121+
"documents_url": docs_url,
117122
},
118123
}
119124
return message.send()

src/hope_country_report/web/templates/admin/power_query/_celery.html

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,4 @@
2828
<a class="button" target="_flower" href="{{ flower_address }}/task/{{ original.curr_async_result_id }}">Flower</a>
2929
{% endif %}
3030
{% endif %}
31-
32-
33-
{% if user.is_superuser %}
34-
<span style="float: right">
35-
<a class="button" id="celery-info" href="#">?</a>
36-
<div class="popup hidden" id="celery-info-panel">
37-
<table>
38-
<tr><td>Position</td><td>{{ original.get_celery_queue_position }}</td></tr>
39-
<tr><th colspan="2">Tasks</th></tr>
40-
<tr><td>pending</td><td>{{ original.celery_queue_status.pending }}</td></tr>
41-
<tr><td>canceled</td><td>{{ original.celery_queue_status.canceled }}</td></tr>
42-
<tr><th colspan="2">Queue</th></tr>
43-
<tr><td>size</td><td>{{ original.celery_queue_status.size }}</td></tr>
44-
<tr><td>revoked</td><td>{{ original.celery_queue_status.revoked }}</td></tr>
45-
</table>
46-
</div>
47-
</span>
48-
{% endif %}
4931
</div>

0 commit comments

Comments
 (0)