merge tls-sprint
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 13 May 2009 15:55:47 +0200
branchtls-sprint
changeset 1794 e735cb4650c6
parent 1793 fdac26e003e7 (current diff)
parent 1783 b81f9761907c (diff)
child 1795 abffc24f93c5
merge
--- a/server/sqlutils.py	Wed May 13 15:55:08 2009 +0200
+++ b/server/sqlutils.py	Wed May 13 15:55:47 2009 +0200
@@ -9,6 +9,7 @@
 from warnings import warn
 from datetime import datetime, date, timedelta
 
+import logilab.common as lgc
 from logilab.common.shellutils import ProgressBar
 from logilab.common import db
 from logilab.common.adbh import get_adv_func_helper
@@ -23,7 +24,7 @@
 from cubicweb.server.utils import crypt_password
 
 
-db.USE_MX_DATETIME = False
+lgc.USE_MX_DATETIME = False
 SQL_PREFIX = 'cw_'
 
 
--- a/web/views/autoform.py	Wed May 13 15:55:08 2009 +0200
+++ b/web/views/autoform.py	Wed May 13 15:55:47 2009 +0200
@@ -137,14 +137,12 @@
             # XXX use a sample target type. Document this.
             tschemas = rschema.targets(eschema, role)
             fieldcls = cls_or_self.rfields.etype_get(eschema, rschema, role, tschemas[0])
+            kwargs = cls_or_self.rfields_kwargs.etype_get(eschema, rschema, role, tschemas[0])
+            if kwargs is None:
+                kwargs = {}
             if fieldcls:
-                return fieldcls(name=name, role=role, eidparam=True)
-            kwargs = cls_or_self.rfields_kwargs.etype_get(eschema, rschema, role, tschemas[0])
-            if kwargs:
-                field = guess_field(eschema, rschema, role,
-                                    eidparam=True, **kwargs)
-            else:
-                field = guess_field(eschema, rschema, role, eidparam=True)
+                return fieldcls(name=name, role=role, eidparam=True, **kwargs)
+            field = guess_field(eschema, rschema, role, eidparam=True, **kwargs)
             if field is None:
                 raise
             return field