Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: skip sending interview reschedule email if interview reminder is disabled in HR Settings #2507

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions hrms/hr/doctype/interview/interview.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,11 @@ def reschedule_interview(self, scheduled_on, from_time, to_time):
self.db_set({"scheduled_on": scheduled_on, "from_time": from_time, "to_time": to_time})
self.notify_update()


frappe.msgprint(_("Interview Rescheduled successfully"), indicator="green")
if not cint(frappe.db.get_single_value("HR Settings", "send_interview_reminder")):
return
recipients = get_recipients(self.name)

try:
frappe.sendmail(
recipients=recipients,
Expand All @@ -119,7 +122,6 @@ def reschedule_interview(self, scheduled_on, from_time, to_time):
)
)

frappe.msgprint(_("Interview Rescheduled successfully"), indicator="green")


@frappe.whitelist()
Expand Down
Loading