Skip to content

Unstable - "Duplicate key value violates unique constraint" error #5766

Description

@pcenov

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Observed behavior

Observed while testing #5750:

This one is hard to replicate but I am constantly getting an error for this channel: https://unstable.studio.learningequality.org/en/channels/b8f8783436fd4a1eb49ff815ff360725/#/3cb401b8999f4055b427c8339b473b03

duplicate.key.value.mp4

Expected behavior

It should be investigated what's causing the error.

Steps to reproduce the issue

  1. Sign in to Studio at Unstable
  2. Create a new channel, import content and publish it.
  3. Click the Share button, select the Submit to community library option and submit the form.

Usage Details

  • Studio Unstable
  • OS: Windows 11
  • Browser: Chrome, Firefox

Activity

  1. added theissue type on Mar 17, 2026
  2. pcenov commented on Mar 17, 2026

    @pcenov
    MemberAuthor
  3. AlexVelezLl commented on Mar 17, 2026

    @AlexVelezLl
    Member

    (Note to self) This is happening because it seems that community library submissions are not being sorted correctly from the backend, and endopint isn't returning the most recent submission.

    To replicate, we need to send multiple pending submissions. Approve/reject a previous submission (not the most recent one). Then try to send a new submission, and the error will appear.

  4. self-assigned this
    on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions