Skip to content

Commit

Permalink
Switch method to use browserDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewWilkes committed May 29, 2019
1 parent c9f4938 commit 6ee71d9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Products/Five/browser/metaconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,7 @@ def page(_context, name, permission, for_=Interface,
# class and template
new_class = SimpleViewClass(template, bases=(class_, ), name=name)
else:
if not hasattr(class_, 'browserDefault'):
cdict = {
'browserDefault':
lambda self, request: (getattr(self, attribute), ())
}
else:
cdict = {}

cdict = {}
cdict['__name__'] = name
cdict['__page_attribute__'] = attribute
cdict.update(getSecurityInfo(class_))
Expand Down

0 comments on commit 6ee71d9

Please sign in to comment.