--- a/web/facet.py Wed Dec 09 12:22:21 2009 +0100
+++ b/web/facet.py Wed Dec 09 12:24:38 2009 +0100
@@ -109,8 +109,8 @@
if rel.optional in (opt, 'both'):
# optional relation
return ovar
- if all(rdefs.cardinality[cardidx] in '1+'
- for rdefs in rschema.rdefs.itervalues()):
+ if all(rdef.cardinality[cardidx] in '1+'
+ for rdef in rschema.rdefs.values()):
# mandatory relation without any restriction on the other variable
for orel in ovar.stinfo['relations']:
if rel is orel:
--- a/web/views/editcontroller.py Wed Dec 09 12:22:21 2009 +0100
+++ b/web/views/editcontroller.py Wed Dec 09 12:24:38 2009 +0100
@@ -166,7 +166,7 @@
toinsert = self._cw.list_form_param('__insert', formparams, pop=True)
self.insert_relations(parse_relations_descr(toinsert))
if is_main_entity: # only execute linkto for the main entity
- self.execute_linkto(eid)
+ self.execute_linkto(entity.eid)
return eid
def handle_formfield(self, form, field, entity, rqlquery):
--- a/web/views/formrenderers.py Wed Dec 09 12:22:21 2009 +0100
+++ b/web/views/formrenderers.py Wed Dec 09 12:24:38 2009 +0100
@@ -362,7 +362,7 @@
attrs_fs_label = ''
if self.main_form_title:
attrs_fs_label += ('<div class="iformTitle"><span>%s</span></div>'
- % self.req._(self.main_form_title))
+ % self._cw._(self.main_form_title))
attrs_fs_label += '<div class="formBody">'
return attrs_fs_label + super(EntityFormRenderer, self).open_form(form, values)
--- a/web/views/owl.py Wed Dec 09 12:22:21 2009 +0100
+++ b/web/views/owl.py Wed Dec 09 12:24:38 2009 +0100
@@ -191,7 +191,7 @@
continue
for tschema in targetschemas:
rdef = rschema.role_rdef(eschema, tschema, role)
- if rdef.may_have_permission('read', self.req):
+ if rdef.may_have_permission('read', self._cw):
break
else:
# no read perms to any relation of this type. Skip.
--- a/web/views/primary.py Wed Dec 09 12:22:21 2009 +0100
+++ b/web/views/primary.py Wed Dec 09 12:24:38 2009 +0100
@@ -196,7 +196,7 @@
# default to 1000 so view boxes occurs after component boxes
return x[-1].get('order', 1000)
# x is a component box
- return x.propval('order')
+ return x.cw_propval('order')
return sorted(sideboxes, key=get_order)
def _section_def(self, entity, where):