Skip to content

Commit

Permalink
Fix for request being passed as sort_params parameter to Report __init__
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Suwala committed Mar 27, 2018
1 parent decc5e6 commit 73c097e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin_reports/views.py
Expand Up @@ -245,7 +245,8 @@ def _export(self, form=None):
}
return render(self.request, 'admin/export.html', ctx)

def post(self, *args, **kwargs):
def post(self, request, *args, **kwargs):
# TODO: FIXME: you shouldn't just pass request args to Report __init__() this is straight up dangerous.
self.report = self.report_class(*args, **kwargs)
if not self.report.has_permission(self.request):
raise PermissionDenied()
Expand Down

0 comments on commit 73c097e

Please sign in to comment.