Skip to content

Commit

Permalink
Fix 0f458e8: local storage file nonce always returns 0 (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrbaker authored Mar 31, 2022
1 parent c666466 commit 770dd36
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions truewiki/storage/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 770dd36

Please sign in to comment.