web/views/editforms.py
branchtls-sprint
changeset 1762 1f7bb0cd950c
parent 1760 6b97d286eb5a
child 1763 65ec5ccc8927
--- a/web/views/editforms.py	Tue May 12 19:21:42 2009 +0200
+++ b/web/views/editforms.py	Tue May 12 19:58:55 2009 +0200
@@ -94,18 +94,18 @@
     ondblclick = "showInlineEditionForm(%(eid)s, '%(rtype)s', '%(divid)s')"
 
     def cell_call(self, row, col, rtype=None, role='subject', reload=False,
-                  vid='textoutofcontext'):
+                  vid='textoutofcontext', default=u''):
         """display field to edit entity's `rtype` relation on double-click"""
         rschema = self.schema.rschema(rtype)
         entity = self.entity(row, col)
         if rschema.is_final():
             if getattr(entity, rtype) is None:
-                value = self.req._('not specified')
+                value = default or self.req._('not specified')
             else:
                 value = entity.printable_value(rtype)
         else:
             rset = entity.related(rtype, role)
-            value = self.view(vid, rset, 'null')
+            value = self.view(vid, rset, 'null') or default
         if not entity.has_perm('update'):
             self.w(value)
             return