Commit d173ef36 authored by Aurélien Bompard's avatar Aurélien Bompard

Moderation reason is exposed as 'reason' in REST

See mailmanclient@c56dcfcf.
parent 95ca5278
Pipeline #4123781 passed with stage
in 2 minutes and 38 seconds
......@@ -48,15 +48,7 @@
<td><a href="#" class="show-modal-btn" data-msgid="{{ msg.request_id }}">{{ msg.subject }}</a>
</td>
<td>{{ msg.sender }}</td>
<td>
{% if msg.reasons %}
{{ msg.reason }}
{% else %}
{% for reason in msg.reasons %}
<p>{{ reason }}</p>
{% endfor %}
{% endif %}
</td>
<td>{{ msg.reason }}</td>
<td>{{ msg.hold_date }}</td>
</tr>
{% endfor %}
......
......@@ -79,11 +79,7 @@ def get_held_message(request, list_id, held_id=-1):
return HttpResponse(held_message.msg, content_type='text/plain')
response_data = dict()
response_data['sender'] = held_message.sender
try:
response_data['reasons'] = held_message.reasons
except AttributeError:
pass
response_data['reasons'] = held_message.reasons
response_data['reason'] = held_message.reason
response_data['hold_date'] = held_message.hold_date
response_data['msg'] = parse(held_message.msg)
response_data['msgid'] = held_message.request_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment