diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml
index a2f607bc50de6007e7956914a291654baae61f27..79ccd5d2780367c084b44119be9196118c6db665 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml
@@ -159,7 +159,7 @@ try:\n
 \n
   # If url is too long, we do not redirecting\n
   # to avoir crash <christophe@nexedi.com>\n
-  if make_query(cleanedup_kw) > 200 :\n
+  if len(make_query(cleanedup_kw)) > 200 :\n
     cannot_redirect = 1\n
 \n
   # if we cannot redirect, then call the form directly.\n