-
Notifications
You must be signed in to change notification settings - Fork 394
Bug: Soft-deleted repository blocks re-submission with UNIQUE constraint error #347
Copy link
Copy link
Open
Description
Description
When a repository submission fails (e.g. due to wrong credentials) and is then deleted from the admin panel, the record is soft-deleted (IsDeleted=1) but the UNIQUE constraint on (OrgName, RepoName) still blocks re-submission of the same
repository.
Steps to Reproduce
- Submit a private repository (e.g.
org/repo) with incorrect credentials - The repository processing fails
- Delete the repository from admin panel (
/admin/repositories) - Try to submit the same repository again
Expected Behavior
Re-submission should succeed since the previous record was deleted.
Actual Behavior
Backend returns SQLite Error 19: UNIQUE constraint failed: Repositories.OrgName, Repositories.RepoName
The admin panel shows no repositories (soft-deleted records are hidden), so the user has no way to fix this through the UI.
Suggested Fix
Either:
- Add a unique index filter:
WHERE IsDeleted = 0(so soft-deleted records don't conflict) - Or check for soft-deleted duplicates on submission and either hard-delete or restore them
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels