cleanup stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 15 Feb 2010 15:20:45 +0100
branchstable
changeset 4583 356f08325072
parent 4582 d12b81facd1d
child 4584 eef17cfcfa9c
cleanup
mail.py
web/formfields.py
web/formwidgets.py
web/views/actions.py
web/views/forms.py
--- a/mail.py	Mon Feb 15 15:20:06 2010 +0100
+++ b/mail.py	Mon Feb 15 15:20:45 2010 +0100
@@ -200,7 +200,8 @@
                 continue
             except Exception, ex:
                 # shouldn't make the whole transaction fail because of rendering
-                # error (unauthorized or such)
+                # error (unauthorized or such) XXX check it doesn't actually
+                # occurs due to rollback on such error
                 self.exception(str(ex))
                 continue
             msg = format_mail(self.user_data, [emailaddr], content, subject,
--- a/web/formfields.py	Mon Feb 15 15:20:06 2010 +0100
+++ b/web/formfields.py	Mon Feb 15 15:20:45 2010 +0100
@@ -838,7 +838,6 @@
             values = (values,)
         eids = set()
         for eid in values:
-            # XXX 'not eid' for AutoCompletionWidget, deal with this in the widget
             if not eid or eid == INTERNAL_FIELD_VALUE:
                 continue
             typed_eid = form.actual_eid(eid)
--- a/web/formwidgets.py	Mon Feb 15 15:20:06 2010 +0100
+++ b/web/formwidgets.py	Mon Feb 15 15:20:45 2010 +0100
@@ -17,6 +17,7 @@
 from cubicweb import tags, uilib
 from cubicweb.web import stdmsgs, INTERNAL_FIELD_VALUE, ProcessFormError
 
+
 class FieldWidget(object):
     """abstract widget class"""
     # javascript / css files required by the widget
--- a/web/views/actions.py	Mon Feb 15 15:20:06 2010 +0100
+++ b/web/views/actions.py	Mon Feb 15 15:20:45 2010 +0100
@@ -31,7 +31,7 @@
         # if user has no update right but it can modify some relation,
         # display action anyway
         form = entity._cw.vreg['forms'].select('edition', entity._cw,
-                                             entity=entity)
+                                               entity=entity)
         for dummy in form.editable_relations():
             return 1
         try:
--- a/web/views/forms.py	Mon Feb 15 15:20:06 2010 +0100
+++ b/web/views/forms.py	Mon Feb 15 15:20:45 2010 +0100
@@ -266,6 +266,9 @@
             self.form_renderer_id, self._cw, rset=self.cw_rset, row=self.cw_row,
             col=self.cw_col, entity=self.edited_entity)
 
+    def should_display_add_new_relation_link(self, rschema, existant, card):
+        return False
+
     # controller side method (eg POST reception handling)
 
     def actual_eid(self, eid):
@@ -284,9 +287,6 @@
     def editable_relations(self):
         return ()
 
-    def should_display_add_new_relation_link(self, rschema, existant, card):
-        return False
-
     @deprecated('[3.6] use cw.web.formfields.relvoc_unrelated function')
     def subject_relation_vocabulary(self, rtype, limit=None):
         """defaut vocabulary method for the given relation, looking for