Skip to content

Commit

Permalink
Cleanup & PEP8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alecghica committed Jan 21, 2015
1 parent 6b08eb5 commit a28176e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plone/app/caching/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def getObjectDefaultView(context):

fti = context.getTypeInfo()
try:
# XXX: This isn't quite right since it assumes the action starts with ${object_url}
# XXX: This isn't quite right since it assumes the action starts
#with ${object_url}
action = fti.getActionInfo('object/view')['url'].split('/')[-1]
except ValueError:
# If the action doesn't exist, stop
Expand All @@ -57,13 +58,12 @@ def getObjectDefaultView(context):
if action:
action = fti.queryMethodID(action, default = action, context = context)
else:
action = fti.queryMethodID('(Default)', default = action, context = context)
action = fti.queryMethodID('(Default)', default = action,
context = context)

# Strip off leading / and/or @@
if action and action[0] == '/':
action = action[1:]
if action and action.startswith('@@'):
action = action[2:]
return action


0 comments on commit a28176e

Please sign in to comment.