Commit f82cc051 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

Fix patches, break in test mode

It seems that in test mode, monkey patch is done after cubicweb.web.views.forms
has been loaded, which hence references the original guess_field (monkey-patched
by cube'site_cubicweb).

Using the proper module fixes the problem.
parent fa0a0bb2da4b
......@@ -38,6 +38,7 @@ def _build_form(*args, **kwargs):
# (
# other part in site_cubicweb
from cubicweb.web import formfields # noqa
from cubicweb.web.views import forms # noqa
......@@ -70,7 +71,7 @@ def field_by_name(cls_or_self, name, role=None, eschema=None):
req = None
req = cls_or_self._cw
field = forms.guess_field(eschema, rschema, role, req=req, eidparam=True, **kwargs)
field = formfields.guess_field(eschema, rschema, role, req=req, eidparam=True, **kwargs)
if field is None:
return field
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment