# HG changeset patch # User Sylvain Thénault # Date 1253694124 -7200 # Node ID f893f4f199fc8d8e4b2ac041b38c4f56d6532d0e # Parent 93fc0070673aef572e43105ae5dff26020af5765 use ._cw instead of req on appobject classes diff -r 93fc0070673a -r f893f4f199fc schema.py --- a/schema.py Wed Sep 23 10:21:37 2009 +0200 +++ b/schema.py Wed Sep 23 10:22:04 2009 +0200 @@ -959,12 +959,12 @@ @monkeypatch(FormatConstraint) def vocabulary(self, entity=None, form=None): - req = None + cw = None if form is None and entity is not None: - req = entity.req + cw = entity._cw elif form is not None: - req = form.req - if req is not None and req.user.has_permission(PERM_USE_TEMPLATE_FORMAT): + cw = form._cw + if cw is not None and cw.user.has_permission(PERM_USE_TEMPLATE_FORMAT): return self.regular_formats + tuple(NEED_PERM_FORMATS) return self.regular_formats