entities/wfobjs.py
changeset 10095 200bd6a601dc
parent 9892 928732ec00dd
child 10096 decd60fa8cc5
--- a/entities/wfobjs.py	Wed May 14 15:05:31 2014 +0200
+++ b/entities/wfobjs.py	Thu Nov 06 14:35:25 2014 +0100
@@ -87,7 +87,7 @@
     def transition_by_name(self, trname):
         rset = self._cw.execute('Any T, TN WHERE T name TN, T name %(n)s, '
                                 'T transition_of WF, WF eid %(wf)s',
-                                {'n': trname, 'wf': self.eid})
+                                {'n': unicode(trname), 'wf': self.eid})
         if rset:
             return rset.get_entity(0, 0)
         return None
@@ -231,7 +231,7 @@
         for gname in requiredgroups:
             rset = self._cw.execute('SET T require_group G '
                                     'WHERE T eid %(x)s, G name %(gn)s',
-                                    {'x': self.eid, 'gn': gname})
+                                    {'x': self.eid, 'gn': unicode(gname)})
             assert rset, '%s is not a known group' % gname
         if isinstance(conditions, basestring):
             conditions = (conditions,)
@@ -454,7 +454,7 @@
             'Any T,TT, TN WHERE S allowed_transition T, S eid %(x)s, '
             'T type TT, T type %(type)s, '
             'T name TN, T transition_of WF, WF eid %(wfeid)s',
-            {'x': self.current_state.eid, 'type': type,
+            {'x': self.current_state.eid, 'type': unicode(type),
              'wfeid': self.current_workflow.eid})
         for tr in rset.entities():
             if tr.may_be_fired(self.entity.eid):