fix admin page error

This commit is contained in:
felinae98 2022-02-24 22:25:25 +08:00
parent 319ffc8a45
commit e078f27ae2
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610

View File

@ -45,10 +45,10 @@ class SinglePageApplication(StaticFiles):
self.index = index
super().__init__(directory=directory, packages=None, html=True, check_dir=True)
async def lookup_path(self, path: str) -> tuple[str, Union[os.stat_result, None]]:
full_path, stat_res = await super().lookup_path(path)
def lookup_path(self, path: str) -> tuple[str, Union[os.stat_result, None]]:
full_path, stat_res = super().lookup_path(path)
if stat_res is None:
return await super().lookup_path(self.index)
return super().lookup_path(self.index)
return (full_path, stat_res)