[FIX] report_download controller method signature in two modules

This commit is contained in:
Stefan Rijnhart
2022-05-11 19:27:48 +02:00
parent 7090dc3430
commit db971c4a3c
2 changed files with 6 additions and 4 deletions

View File

@@ -57,7 +57,7 @@ class ReportController(main.ReportController):
return request.make_response(res, headers=http_headers)
@route()
def report_download(self, data, token):
def report_download(self, data, token, context=None):
"""This function is used by 'qwebactionmanager.js' in order to trigger
the download of a py3o/controller report.
@@ -68,7 +68,9 @@ class ReportController(main.ReportController):
requestcontent = json.loads(data)
url, report_type = requestcontent[0], requestcontent[1]
if "py3o" not in report_type:
return super(ReportController, self).report_download(data, token)
return super(ReportController, self).report_download(
data, token, context=context
)
try:
reportname = url.split("/report/py3o/")[1].split("?")[0]
docids = None