cubicweb/web/views/autoform.py
branch3.26
changeset 12675 ea89ca9017c4
parent 12352 1a0159426def
child 12676 c96aa316d06b
--- a/cubicweb/web/views/autoform.py	Wed Jun 26 15:01:45 2019 +0200
+++ b/cubicweb/web/views/autoform.py	Thu Jun 27 12:13:21 2019 +0200
@@ -118,6 +118,7 @@
 .. Controlling the generic relation fields
 """
 
+import six
 from six.moves import range
 
 from logilab.mtconverter import xml_escape
@@ -310,7 +311,7 @@
         if form.form_previous_values:
             cdvalues = self._cw.list_form_param(eid_param(self.rtype, self.peid),
                                                 form.form_previous_values)
-            if unicode(entity.eid) not in cdvalues:
+            if six.text_type(entity.eid) not in cdvalues:
                 return False
         return True