From fc36e57233534a68ce9d8e66ffa6e972c98f926b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 21 Jan 2013 19:02:58 +0530 Subject: [PATCH] fixes in setup control and website contact helper --- setup/doctype/setup_control/setup_control.py | 2 +- website/helpers/contact.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py index 4bc36481d5..86cdc8e82e 100644 --- a/setup/doctype/setup_control/setup_control.py +++ b/setup/doctype/setup_control/setup_control.py @@ -236,7 +236,7 @@ class DocType: on duplicate key update `password`=password(%s)""", (user_email, pwd, pwd)) - self.add_all_roles_to(pr.name) + add_all_roles_to(pr.name) def add_all_roles_to(name): profile = webnotes.doc("Profile", name) diff --git a/website/helpers/contact.py b/website/helpers/contact.py index a9499abb79..0ec279ecad 100644 --- a/website/helpers/contact.py +++ b/website/helpers/contact.py @@ -36,7 +36,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): name = webnotes.conn.get_value("Lead", {"email_id": sender}, "name") if name: lead = webnotes.model_wrapper("Lead", name) - lead.doc.status = "Open" + lead.doc.status = status lead.ignore_permissions = True lead.save() else: @@ -44,7 +44,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): "doctype":"Lead", "lead_name": sender, "email_id": sender, - "status": "Open", + "status": status, "source": "Website" }) lead.ignore_permissions = True