Skip to content

Commit

Permalink
[#2006] apply package_saver.py change to plugins.py (fix merge conflict)
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Nov 23, 2014
1 parent 525fd7d commit 1176e03
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ckan/lib/plugins.py
Expand Up @@ -240,9 +240,13 @@ def setup_template_variables(self, context, data_dict):
c.pkg_notes_formatted = render_markdown(c.pkg.notes)

if context.get('revision_id') or context.get('revision_date'):
c.pkg_revision_id = c.pkg_dict[u'revision_id']
c.pkg_revision_timestamp = c.pkg_dict[u'revision_timestamp']
c.pkg_revision_not_latest = c.pkg_dict[u'revision_id'] != c.pkg.revision.id
if context.get('revision_id'):
rev = model.Session.query(model.Revision) \
.filter_by(id=context['revision_id']) \
.first()
c.revision_date = rev.timestamp if rev else '?'
else:
c.revision_date = context.get('revision_date')

## This is messy as auths take domain object not data_dict
context_pkg = context.get('package', None)
Expand Down

0 comments on commit 1176e03

Please sign in to comment.