skil internal field value, else we get an error
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 25 Jan 2010 19:48:19 +0100
changeset 4345 06a34ff6b49a
parent 4344 066e7884e57d
child 4346 02f12f39bae5
skil internal field value, else we get an error
web/box.py
--- a/web/box.py	Mon Jan 25 19:36:04 2010 +0100
+++ b/web/box.py	Mon Jan 25 19:48:19 2010 +0100
@@ -16,6 +16,7 @@
                                 match_context_prop, partial_has_related_entities)
 from cubicweb.view import View, ReloadableMixIn
 
+from cubicweb.web import INTERNAL_FIELD_VALUE
 from cubicweb.web.htmlwidgets import (BoxLink, BoxWidget, SideBoxWidget,
                                       RawBoxItem, BoxSeparator)
 from cubicweb.web.action import UnregisteredAction
@@ -222,7 +223,7 @@
                                          row=self.cw_row or 0)
         field = form.field_by_name(self.rtype, get_role(self), entity.e_schema)
         for _, eid in field.choices(form):
-            if eid is not None:
+            if eid is not None and eid != INTERNAL_FIELD_VALUE:
                 rset = self._cw.eid_rset(eid)
                 entities.append(rset.get_entity(0, 0))
         return entities