When a student attempts to edit or update an existing assignment submission, they receive the following error:
"Assignment for Lesson None by [student name] already exists."
The submission was already saved successfully, but any attempt to make changes to it triggers this duplicate document error.
Steps to Reproduce:
Student navigates to a lesson with an assignment
Student submits the assignment successfully
Student attempts to edit/update the existing submission
Error appears: "Assignment for Lesson None by [username] already exists"
Expected Behavior:
The system should detect the existing submission and update it rather than attempting to create a new record.
Actual Behavior:
The system loses the lesson reference (returning Lesson None) and tries to insert a duplicate LMS Assignment Submission record, resulting in a conflict error.
Environment:
LMS: Frappe LMS
Issue affects students editing submissions from the lesson front-end page
Possible Cause:
The lesson context is not being passed correctly during re-submission, causing the system to fail to match the existing record and attempting to create a duplicate instead.
Workaround:
Admin manually edits or deletes and re-creates the submission from the Frappe Desk backend.
@pateljannat I hope this issue is resolved as soon as possible
Thank you

When a student attempts to edit or update an existing assignment submission, they receive the following error:
"Assignment for Lesson None by [student name] already exists."
The submission was already saved successfully, but any attempt to make changes to it triggers this duplicate document error.
Steps to Reproduce:
Student navigates to a lesson with an assignment
Student submits the assignment successfully
Student attempts to edit/update the existing submission
Error appears: "Assignment for Lesson None by [username] already exists"
Expected Behavior:
The system should detect the existing submission and update it rather than attempting to create a new record.
Actual Behavior:
The system loses the lesson reference (returning Lesson None) and tries to insert a duplicate LMS Assignment Submission record, resulting in a conflict error.
Environment:
LMS: Frappe LMS
Issue affects students editing submissions from the lesson front-end page
Possible Cause:
The lesson context is not being passed correctly during re-submission, causing the system to fail to match the existing record and attempting to create a duplicate instead.
Workaround:
Admin manually edits or deletes and re-creates the submission from the Frappe Desk backend.
@pateljannat I hope this issue is resolved as soon as possible
Thank you