[reledit] don't try to use rel-edit on attributes without assicated fields (e.g _format field)
--- a/web/views/editforms.py Tue Aug 04 11:35:57 2009 +0200
+++ b/web/views/editforms.py Tue Aug 04 11:36:47 2009 +0200
@@ -21,7 +21,7 @@
from cubicweb.view import EntityView
from cubicweb.common import tags
from cubicweb.web import INTERNAL_FIELD_VALUE, stdmsgs, eid_param, uicfg
-from cubicweb.web.form import FormViewMixIn
+from cubicweb.web.form import FormViewMixIn, FieldNotFound
from cubicweb.web.formfields import guess_field
from cubicweb.web.formwidgets import Button, SubmitButton, ResetButton
from cubicweb.web.views import forms
@@ -249,6 +249,11 @@
domid='%s-form' % divid, action='#',
cssstyle='display: none',
onsubmit=onsubmit % event_data)
+ try:
+ field = form.field_by_name(rtype, role)
+ except FieldNotFound:
+ self.w(value)
+ return
w = self.w
w(u'<div class="field">')
w(u'<div id="%s" style="display: inline">' % divid)