From 770dd365deedeb84bcdb725b18ffb12244e60799 Mon Sep 17 00:00:00 2001 From: Quentin <14336407+Qrbaker@users.noreply.github.com> Date: Thu, 31 Mar 2022 01:24:51 -0400 Subject: [PATCH] Fix 0f458e8b: local storage file nonce always returns 0 (#294) --- truewiki/storage/local.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/truewiki/storage/local.py b/truewiki/storage/local.py index 3b10e5e..af0b5ce 100644 --- a/truewiki/storage/local.py +++ b/truewiki/storage/local.py @@ -37,11 +37,7 @@ def get_repository_url(self): return "" def get_file_nonce(self, filename: str) -> str: - return ( - str(os.path.getmtime(f"{self._folder}/{filename}")) - if self.file_exists(f"{self._folder}/{filename}") - else "0" - ) + return str(os.path.getmtime(f"{self._folder}/{filename}")) if self.file_exists(filename) else "0" def file_exists(self, filename: str) -> bool: return os.path.exists(f"{self._folder}/{filename}")