mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-07 20:42:50 +00:00
Bug fix in email_campaign's update_status function. (#45679)
During the scheduler event of set_email_campaign_status, the function calling update_status isn't saving the modified status field.
(cherry picked from commit 88e68bb803)
Co-authored-by: harshpwctech <84438948+harshpwctech@users.noreply.github.com>
This commit is contained in:
@@ -78,11 +78,11 @@ class EmailCampaign(Document):
|
|||||||
end_date = getdate(self.end_date)
|
end_date = getdate(self.end_date)
|
||||||
today_date = getdate(today())
|
today_date = getdate(today())
|
||||||
if start_date > today_date:
|
if start_date > today_date:
|
||||||
self.status = "Scheduled"
|
self.db_set("status", "Scheduled", update_modified=False)
|
||||||
elif end_date >= today_date:
|
elif end_date >= today_date:
|
||||||
self.status = "In Progress"
|
self.db_set("status", "In Progress", update_modified=False)
|
||||||
elif end_date < today_date:
|
elif end_date < today_date:
|
||||||
self.status = "Completed"
|
self.db_set("status", "Completed", update_modified=False)
|
||||||
|
|
||||||
|
|
||||||
# called through hooks to send campaign mails to leads
|
# called through hooks to send campaign mails to leads
|
||||||
|
|||||||
Reference in New Issue
Block a user