[PATCH 1 of 3 3.26] [py3] unicode() -> six.text_type in autoform

Denis Laxalde denis.laxalde at logilab.fr
Thu Jun 27 12:53:55 CEST 2019


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1561630401 -7200
#      jeu. juin 27 12:13:21 2019 +0200
# Branch 3.26
# Node ID ea89ca9017c43f50e8a2558889f08af60f4314c7
# Parent  7ef1c90912831f46ad568ada8eec55c67e91808a
# Available At https://hg.logilab.org/review/cubicweb
#              hg pull https://hg.logilab.org/review/cubicweb -r ea89ca9017c4
[py3] unicode() -> six.text_type in autoform

diff --git a/cubicweb/web/views/autoform.py b/cubicweb/web/views/autoform.py
--- a/cubicweb/web/views/autoform.py
+++ b/cubicweb/web/views/autoform.py
@@ -118,6 +118,7 @@ checking for dark-corner case where it c
 .. Controlling the generic relation fields
 """
 
+import six
 from six.moves import range
 
 from logilab.mtconverter import xml_escape
@@ -310,7 +311,7 @@ class InlineEntityEditionFormView(f.Form
         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
 



More information about the cubicweb-devel mailing list