Skip to content

Commit

Permalink
[xs] make sure tracking summary does not get shown on edit of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
kindly committed May 3, 2012
1 parent b9d6d42 commit 84817a9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckan/lib/dictization/model_dictize.py
Expand Up @@ -98,9 +98,10 @@ def resource_dictize(res, context):
if extras:
resource.update(extras)
#tracking
model = context['model']
tracking = model.TrackingSummary.get_for_resource(res.url)
resource['tracking_summary'] = tracking
if not context.get('for_edit'):
model = context['model']
tracking = model.TrackingSummary.get_for_resource(res.url)
resource['tracking_summary'] = tracking
return resource

def related_dictize(rel, context):
Expand Down

0 comments on commit 84817a9

Please sign in to comment.