minor fix

This commit is contained in:
Akhilesh Darjee 2014-01-15 11:54:05 +05:30
parent 6a749e3a8e
commit 2a79b00700
2 changed files with 2 additions and 3 deletions

View File

@ -25,8 +25,7 @@ class DocType(DocTypeNestedSet):
def get_email_id(self):
profile = webnotes.conn.get_value("Employee", self.doc.employee, "user_id")
if not profile:
webnotes.msgprint("User ID (Profile) not set for Employee %s" % self.doc.employee,
raise_exception=True)
webnotes.throw("User ID (Profile) not set for Employee %s" % self.doc.employee)
else:
return webnotes.conn.get_value("Profile", profile, "email") or profile

View File

@ -93,7 +93,7 @@ class DocType(TransactionBase):
date_diff = (getdate(end_date) - getdate(start_date)).days
add_by = date_diff / no_of_visit
for visit in range(0, cint(no_of_visit)):
for visit in range(cint(no_of_visit)):
if (getdate(start_date_copy) < getdate(end_date)):
start_date_copy = add_days(start_date_copy, add_by)
if len(schedule_list) < no_of_visit: