PDF export second time triggers /download/pdfpdf instead of /download/pdf
@upspw @Jonas.Deipenbrock
An attempt to save PDF second time triggers /download/pdfpdf instead of /download/pdf, which leads to the error. (Third time /download/pdfpdfpdf)
The error message:
backend_1 | [2021-03-24 10:32:01,203] ERROR in app: Exception on /download/pdfpdf [POST]
backend_1 | Traceback (most recent call last):
backend_1 | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app
backend_1 | response = self.full_dispatch_request()
backend_1 | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request
backend_1 | rv = self.handle_user_exception(e)
backend_1 | File "/usr/local/lib/python3.8/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
backend_1 | return cors_after_request(app.make_response(f(*args, **kwargs)))
backend_1 | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception
backend_1 | reraise(exc_type, exc_value, tb)
backend_1 | File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
backend_1 | raise value
backend_1 | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request
backend_1 | rv = self.dispatch_request()
backend_1 | File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request
backend_1 | return self.view_functions[rule.endpoint](**req.view_args)
backend_1 | File "/srv/o3webapp-be/o3webapp_be/backend/back_end.py", line 63, in handle_request_for_download
backend_1 | r = userManager.handle_process_on_plotpage("plot", format) ## TODO "pdf"
backend_1 | File "/srv/o3webapp-be/o3webapp_be/backend/userManager.py", line 45, in handle_process_on_plotpage
backend_1 | return UserManager.opDict[opID](self.jsonRequest).handle_process()
backend_1 | File "/srv/o3webapp-be/o3webapp_be/backend/controller.py", line 84, in handle_process
backend_1 | self.plotData = self.plotParser.parse_request_2_plotdata(self.jsonRequest)
backend_1 | File "/srv/o3webapp-be/o3webapp_be/backend/requestParser.py", line 53, in parse_request_2_plotdata
backend_1 | plotdata = PlotData(typeName, varData, output)
backend_1 | File "/srv/o3webapp-be/o3webapp_be/backend/plotData.py", line 32, in __init__
backend_1 | self.output = OutputFormat[output]
backend_1 | File "/usr/lib/python3.8/enum.py", line 349, in __getitem__
backend_1 | return cls._member_map_[name]
backend_1 | KeyError: 'pdfpdf'