From e235f0f9d63cf895f34201479886a5b39d5069e3 Mon Sep 17 00:00:00 2001
From: Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Date: Thu, 27 Oct 2011 10:04:18 +0200
Subject: [PATCH] turn ugly hack about dictionaries in records back on so the
 tests can run

---
 sfa/plc/api.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/sfa/plc/api.py b/sfa/plc/api.py
index 2977a535..4ce2f9e8 100644
--- a/sfa/plc/api.py
+++ b/sfa/plc/api.py
@@ -584,15 +584,15 @@ class SfaAPI(BaseAPI):
             oldList = []     
         newList = record.get(listName, [])
         # ugly hack to see what's next
-        #def normalize (value):
-        #    from types import StringTypes
-        #    from sfa.util.sfalogging import logger
-        #    if isinstance(value,StringTypes): return value
-        #    elif isinstance(value,dict): 
-        #        newvalue=value['text']
-        #        logger.info("Normalizing %s=>%s"%(value,newvalue))
-        #        return newvalue
-        #newList=[normalize(v) for v in newList]
+        def normalize (value):
+            from types import StringTypes
+            from sfa.util.sfalogging import logger
+            if isinstance(value,StringTypes): return value
+            elif isinstance(value,dict): 
+                newvalue=value['text']
+                logger.info("Normalizing %s=>%s"%(value,newvalue))
+                return newvalue
+        newList=[normalize(v) for v in newList]
 
         # if the lists are the same, then we don't have to update anything
         if (oldList == newList):
-- 
2.47.0