Skip to content

Commit

Permalink
[#2006] adjust for different model import
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Nov 23, 2014
1 parent 1176e03 commit abd4172
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/lib/plugins.py
Expand Up @@ -241,9 +241,9 @@ def setup_template_variables(self, context, data_dict):

if context.get('revision_id') or context.get('revision_date'):
if context.get('revision_id'):
rev = model.Session.query(model.Revision) \
.filter_by(id=context['revision_id']) \
.first()
rev = base.model.Session.query(base.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')
Expand Down

0 comments on commit abd4172

Please sign in to comment.