Skip to content

Commit

Permalink
misuse of the audit decorator add return
Browse files Browse the repository at this point in the history
  • Loading branch information
cahytinne committed Jul 29, 2015
1 parent 046856c commit c68c29f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions atramhasis/audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def advice(parent_object, *args, **kw):
)
elif 'scheme_id' not in request.matchdict.keys():
log.error('Misuse of the audit decorator. The url must at least contain a {scheme_id} parameter')
return fn(parent_object, *args, **kw)
else:
visit_log = ConceptschemeVisitLog(conceptscheme_id=request.matchdict['scheme_id'])
response = fn(parent_object, *args, **kw)
Expand Down
1 change: 1 addition & 0 deletions atramhasis/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ def __init__(self, request):
self.localizer = request.localizer
self._ = TranslationStringFactory('atramhasis')

@audit
@view_config(route_name='labeltypes')
def labeltype_list_view(self):
return self.get_list(LabelType)
Expand Down

0 comments on commit c68c29f

Please sign in to comment.