[ckan-changes] [okfn/ckan] 84817a: [xs] make sure tracking summary does not get shown...

GitHub noreply at github.com
Thu May 3 10:08:32 UTC 2012


  Branch: refs/heads/release-v1.7
  Home:   https://github.com/okfn/ckan
  Commit: 84817a91cf57d94c2612d8d5a188ac53b20ea81f
      https://github.com/okfn/ckan/commit/84817a91cf57d94c2612d8d5a188ac53b20ea81f
  Author: kindly <kindly at gmail.com>
  Date:   2012-05-03 (Thu, 03 May 2012)

  Changed paths:
    M ckan/lib/dictization/model_dictize.py

  Log Message:
  -----------
  [xs] make sure tracking summary does not get shown on edit of resources


diff --git a/ckan/lib/dictization/model_dictize.py b/ckan/lib/dictization/model_dictize.py
index 74aa8b7..118ebb3 100644
--- a/ckan/lib/dictization/model_dictize.py
+++ b/ckan/lib/dictization/model_dictize.py
@@ -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):


================================================================



More information about the ckan-changes mailing list