瀏覽代碼

Encode content if not encoded before hashing

version-14
Aditya Hase 7 年之前
父節點
當前提交
234fca90a3
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. +2
    -0
      frappe/utils/file_manager.py

+ 2
- 0
frappe/utils/file_manager.py 查看文件

@@ -301,6 +301,8 @@ def get_file_path(file_name):
return file_path

def get_content_hash(content):
if isinstance(content, text_type):
content = content.encode()
return hashlib.md5(content).hexdigest()

def get_file_name(fname, optional_suffix):


Loading…
取消
儲存