fix: handle html files during scorm page render

This commit is contained in:
Jannat Patel
2024-12-06 13:20:14 +05:30
parent c1fdddbac3
commit 6f73be9a0b
3 changed files with 5 additions and 13 deletions

View File

@@ -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