fix: handle html files during scorm page render
This commit is contained in:
@@ -149,6 +149,11 @@ class SCORMRenderer(BaseRenderer):
|
||||
|
||||
def render(self):
|
||||
path = os.path.join(frappe.local.site_path, "public", self.path.lstrip("/"))
|
||||
|
||||
extension = os.path.splitext(path)[1]
|
||||
if not extension:
|
||||
path = f"{path}.html"
|
||||
|
||||
f = open(path, "rb")
|
||||
response = Response(
|
||||
wrap_file(frappe.local.request.environ, f), direct_passthrough=True
|
||||
|
||||
Reference in New Issue
Block a user