Merge pull request #17538 from adityahase/fix-training-feedback

fix(hr): Use event_status instead of status
This commit is contained in:
Rushabh Mehta 2019-05-21 12:19:03 +05:30 committed by GitHub
commit 98a80407f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,11 +15,11 @@ class TrainingFeedback(Document):
def on_submit(self):
training_event = frappe.get_doc("Training Event", self.training_event)
status = None
event_status = None
for e in training_event.employees:
if e.employee == self.employee:
status = 'Feedback Submitted'
event_status = 'Feedback Submitted'
break
if status:
frappe.db.set_value("Training Event", self.training_event, "status", status)
if event_status:
frappe.db.set_value("Training Event", self.training_event, "event_status", event_status)