fixing context. 1fbeb11a27a3
authorLaure Bourgois <Laure.Bourgois@logilab.fr>
Fri, 20 Mar 2009 15:06:49 +0100
branch1fbeb11a27a3
changeset 1126 9b586c6415ae
parent 1125 1fbeb11a27a3
child 1127 894685124c68
fixing context.
sobjects/notification.py
--- a/sobjects/notification.py	Fri Mar 20 14:52:33 2009 +0100
+++ b/sobjects/notification.py	Fri Mar 20 15:06:49 2009 +0100
@@ -160,8 +160,8 @@
     def context(self, **kwargs):
         entity = self.entity(0, 0)
         for key, val in kwargs.iteritems():
-            if val and val.strip():
-                kwargs[key] = self.req._(val)
+            if val and isinstance(val, unicode) and val.strip():
+               kwargs[key] = self.req._(val)
         kwargs.update({'user': self.user_login(),
                        'eid': entity.eid,
                        'etype': entity.dc_type(),