mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 21:29:11 +00:00
Compatibility with Py2 (#15653)
This commit is contained in:
committed by
Nabin Hait
parent
e9890a3ec8
commit
50447b195d
@@ -9,6 +9,7 @@ from frappe import _
|
|||||||
from email_reply_parser import EmailReplyParser
|
from email_reply_parser import EmailReplyParser
|
||||||
from erpnext.hr.doctype.employee.employee import is_holiday
|
from erpnext.hr.doctype.employee.employee import is_holiday
|
||||||
from frappe.utils import global_date_format
|
from frappe.utils import global_date_format
|
||||||
|
from six import string_types
|
||||||
|
|
||||||
|
|
||||||
class DailyWorkSummary(Document):
|
class DailyWorkSummary(Document):
|
||||||
@@ -108,7 +109,7 @@ def get_user_emails_from_group(group):
|
|||||||
|
|
||||||
:param group: Daily Work Summary Group `name`'''
|
:param group: Daily Work Summary Group `name`'''
|
||||||
group_doc = group
|
group_doc = group
|
||||||
if isinstance(group_doc, str):
|
if isinstance(group_doc, string_types):
|
||||||
group_doc = frappe.get_doc('Daily Work Summary Group', group)
|
group_doc = frappe.get_doc('Daily Work Summary Group', group)
|
||||||
|
|
||||||
emails = [d.email for d in group_doc.users if frappe.db.get_value("User", d.user, "enabled")]
|
emails = [d.email for d in group_doc.users if frappe.db.get_value("User", d.user, "enabled")]
|
||||||
|
|||||||
Reference in New Issue
Block a user