fix: don't check assignment submission status if doc is new
This commit is contained in:
@@ -72,9 +72,12 @@ class LMSAssignmentSubmission(Document):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def validate_status(self):
|
def validate_status(self):
|
||||||
doc_before_save = self.get_doc_before_save()
|
if not self.is_new():
|
||||||
if doc_before_save.status != self.status or doc_before_save.comments != self.comments:
|
doc_before_save = self.get_doc_before_save()
|
||||||
self.trigger_update_notification()
|
if (
|
||||||
|
doc_before_save.status != self.status or doc_before_save.comments != self.comments
|
||||||
|
):
|
||||||
|
self.trigger_update_notification()
|
||||||
|
|
||||||
def trigger_update_notification(self):
|
def trigger_update_notification(self):
|
||||||
notification = frappe._dict(
|
notification = frappe._dict(
|
||||||
|
|||||||
Reference in New Issue
Block a user