fix: training feedback code cleanup
This commit is contained in:
parent
7dcdb93596
commit
c8c678f747
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user