mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-24 12:36:37 +00:00
Fetch defaults in purchase common and sales common related doctypes and fix minor utf-8 issues
This commit is contained in:
@@ -763,7 +763,7 @@ def send():
|
||||
"""
|
||||
edigest_list = webnotes.conn.sql("""
|
||||
SELECT name FROM `tabEmail Digest`
|
||||
WHERE enabled=1
|
||||
WHERE enabled=1 and docstatus<2
|
||||
""", as_list=1)
|
||||
|
||||
from webnotes.model.code import get_obj
|
||||
|
||||
@@ -85,8 +85,9 @@ class DocType:
|
||||
|
||||
from webnotes.utils import file_manager
|
||||
fn, content = file_manager.get_file(fid)
|
||||
|
||||
if not type(content) == str:
|
||||
|
||||
# NOTE: Don't know why this condition exists
|
||||
if not isinstance(content, basestring) and hasattr(content, 'tostring'):
|
||||
content = content.tostring()
|
||||
|
||||
return content
|
||||
return content
|
||||
|
||||
@@ -96,8 +96,9 @@ class DocType:
|
||||
|
||||
from webnotes.utils import file_manager
|
||||
fn, content = file_manager.get_file(fid)
|
||||
|
||||
if not type(content) == str:
|
||||
|
||||
# NOTE: Don't know why this condition exists
|
||||
if not isinstance(content, basestring) and hasattr(content, 'tostring'):
|
||||
content = content.tostring()
|
||||
|
||||
return content
|
||||
|
||||
Reference in New Issue
Block a user