# HG changeset patch # User Adrien Di Mascio # Date 1249378607 -7200 # Node ID c66f52d443943ae0fbc565a9a1d99cd4a258793e # Parent ee5538bdf0ea22eb53b115d6a35f98904bc9c6e0 [reledit] don't try to use rel-edit on attributes without assicated fields (e.g _format field) diff -r ee5538bdf0ea -r c66f52d44394 web/views/editforms.py --- 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'
') w(u'
' % divid)