Skip to content

"Assignment for Lesson None already exists" error when student edits submission and automatically creates a duplicate submission #2284

@firassmsaeed

Description

@firassmsaeed

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

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions