From 1c40aa17b826494fcbe77c639fccf956f2c416c7 Mon Sep 17 00:00:00 2001 From: Zlash65 Date: Wed, 10 Oct 2018 16:54:48 +0530 Subject: [PATCH] minor validation fix to catch email --- .../doctype/conference_participant/conference_participant.py | 3 +-- .../conference_talk_proposal/conference_talk_proposal.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py b/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py index 86e61823..3e96ed0c 100644 --- a/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py +++ b/foundation/erpnext_foundation/doctype/conference_participant/conference_participant.py @@ -9,8 +9,7 @@ from frappe.model.document import Document class ConferenceParticipant(Document): def validate(self): self.conference = '2018' - if self.owner not in ["Guest", "Administrator"] and not self.get("email") \ - and frappe.db.get_value("User", self.owner, "user_type") == "Website User": + if self.owner not in ["Guest", "Administrator"] and not self.get("email"): self.email = frappe.db.get_value('User', self.owner, "email") def validate_payment(self): diff --git a/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.py b/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.py index abfc5fe6..5e951c89 100644 --- a/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.py +++ b/foundation/erpnext_foundation/doctype/conference_talk_proposal/conference_talk_proposal.py @@ -19,8 +19,7 @@ class ConferenceTalkProposal(WebsiteGenerator): def validate(self): self.conference = '2018' - if self.owner not in ["Guest", "Administrator"] and not self.get("email") \ - and frappe.db.get_value("User", self.owner, "user_type") == "Website User": + if self.owner not in ["Guest", "Administrator"] and not self.get("email"): self.email = frappe.db.get_value('User', self.owner, "email") def get_list_context(context):