mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 20:49:19 +00:00
Merge pull request #17197 from nabinhait/training-feedback
fix: training feedback code cleanup
This commit is contained in:
@@ -15,9 +15,11 @@ class TrainingFeedback(Document):
|
|||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
training_event = frappe.get_doc("Training Event", self.training_event)
|
training_event = frappe.get_doc("Training Event", self.training_event)
|
||||||
|
status = None
|
||||||
for e in training_event.employees:
|
for e in training_event.employees:
|
||||||
if e.employee == self.employee:
|
if e.employee == self.employee:
|
||||||
training_event.status = 'Feedback Submitted'
|
status = 'Feedback Submitted'
|
||||||
break
|
break
|
||||||
|
|
||||||
training_event.save()
|
if status:
|
||||||
|
frappe.db.set_value("Training Event", self.training_event, "status", status)
|
||||||
|
|||||||
Reference in New Issue
Block a user