diff --git a/frappe/utils/file_manager.py b/frappe/utils/file_manager.py index de0ebdf12f..822b63e240 100644 --- a/frappe/utils/file_manager.py +++ b/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):