Skip to content

Commit

Permalink
[QCDP24-30] fix datarequest comment and typo (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
awset authored Sep 24, 2024
1 parent ec052d5 commit 6140ac5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ckanext/datarequests/controllers/controller_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ def comment(id):

h.flash_notice(flash_message)

return tk.redirect_to(tk.url_for('datarequest.comment', id=id))

except tk.NotAuthorized as e:
log.warning(e)
return tk.abort(403, tk._('You are not authorized to %s' % action_text))
Expand Down
2 changes: 1 addition & 1 deletion ckanext/datarequests/templates/datarequests/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% if h.check_access('comment_datarequest', {'id':c.datarequest.id }) %}
<div class="comment-new">

{% set create_comment_error = c.updated_comment is defined and c.updated_comment.id == '' %}
{% set create_comment_error = c.updated_comment is defined and c.updated_comment['comment']['id'] == '' %}

{% if create_comment_error %}
<a name="comment_focus"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</div>

{% if can_update %}
{% snippet "datarequests/snippets/comment_form.html", comment_id=comment.id, datarequest=datarequest, errors=errors, errors_summary=errors_summary, initial_text=updated_comment.comment if focus else comment.comment, focus=focus %}
{% snippet "datarequests/snippets/comment_form.html", comment_id=comment.id, datarequest=datarequest, errors=errors, errors_summary=errors_summary, initial_text=updated_comment.comment.comment if focus else comment.comment, focus=focus %}
{% endif %}

</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ To view the data access request, follow this link:
{{ site_url }}/datarequest/{{ datarequest.id }}

Requested data: {{ datarequest.title }}
Current of status: {{ datarequest.status }}
Current status: {{ datarequest.status }}

Do not reply to this email.

0 comments on commit 6140ac5

Please sign in to comment.