[ckan-changes] commit/ckanextiati: amercader: Fix bug in previous commit

Bitbucket commits-noreply at bitbucket.org
Mon Sep 19 15:46:01 UTC 2011


1 new changeset in ckanextiati:

http://bitbucket.org/okfn/ckanextiati/changeset/3e54234ae4a1/
changeset:   3e54234ae4a1
user:        amercader
date:        2011-09-19 17:45:49
summary:     Fix bug in previous commit
affected #:  1 file (-1 bytes)

--- a/ckanext/iati/patch.py	Mon Sep 19 16:37:36 2011 +0100
+++ b/ckanext/iati/patch.py	Mon Sep 19 16:45:49 2011 +0100
@@ -13,9 +13,9 @@
 ######### 
 log.warn("Monkey-patching package serialization format!")
 
-old = Package.as_dict
+old_as_dict = Package.as_dict
 def as_dict_with_groups_types(self):
-    _dict = old(self)
+    _dict = old_as_dict(self)
     _dict['groups_types'] = "".join([g.extras.get('type', '') for g in self.groups])
     return _dict
 
@@ -23,9 +23,9 @@
 
 from ckan.lib.dictization import model_dictize
 
-old = model_dictize.package_dictize
+old_package_dictize = model_dictize.package_dictize
 def package_dictize_with_group_types(pkg,context):
-    _dict = old(pkg,context)
+    _dict = old_package_dictize(pkg,context)
     _dict['groups_types'] = "".join([g.extras.get('type', '') for g in pkg.groups])
     return _dict

Repository URL: https://bitbucket.org/okfn/ckanextiati/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list