Skip to content

Commit

Permalink
Merge pull request #2595 from TkTech/dont_skip_hooks
Browse files Browse the repository at this point in the history
Don't use cached values when rendering notes.
  • Loading branch information
wardi committed Aug 25, 2015
2 parents 6b82fd4 + 0995d45 commit e0732b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions ckan/lib/plugins.py
Expand Up @@ -261,8 +261,6 @@ def show_package_schema(self):
return ckan.logic.schema.default_show_package_schema()

def setup_template_variables(self, context, data_dict):
from ckan.lib.helpers import render_markdown

authz_fn = logic.get_action('group_list_authz')
c.groups_authz = authz_fn(context, data_dict)
data_dict.update({'available_only': True})
Expand All @@ -276,8 +274,8 @@ def setup_template_variables(self, context, data_dict):
c.is_sysadmin = ckan.authz.is_sysadmin(c.user)

if c.pkg:
# Used by the disqus plugin
c.related_count = c.pkg.related_count
c.pkg_notes_formatted = render_markdown(c.pkg.notes)

if context.get('revision_id') or context.get('revision_date'):
if context.get('revision_id'):
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/package/read.html
Expand Up @@ -23,9 +23,9 @@ <h1>
{% endblock %}
</h1>
{% block package_notes %}
{% if c.pkg_notes_formatted %}
{% if pkg.notes %}
<div class="notes embedded-content">
{{ c.pkg_notes_formatted }}
{{ h.render_markdown(pkg.notes) }}
</div>
{% endif %}
{% endblock %}
Expand Down

0 comments on commit e0732b1

Please sign in to comment.