mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-13 01:34:10 +00:00
[fix] [minor] on_communication, when checking if system user, extract email id and then check
This commit is contained in:
@@ -5,7 +5,7 @@ from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from utilities.transaction_base import TransactionBase
|
||||
from webnotes.utils import now
|
||||
from webnotes.utils import now, extract_email_id
|
||||
|
||||
class DocType(TransactionBase):
|
||||
def __init__(self, doc, doclist=[]):
|
||||
@@ -35,7 +35,7 @@ class DocType(TransactionBase):
|
||||
|
||||
def on_communication(self, comm):
|
||||
if comm.sender == self.get_sender(comm) or \
|
||||
webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||
webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User":
|
||||
self.doc.status = "Waiting for Customer"
|
||||
else:
|
||||
self.doc.status = "Open"
|
||||
|
||||
Reference in New Issue
Block a user