Subjects cannot have the same name, blocks import after name is changed
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 16
- Forks
- 7
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 1
Description
The First African Baptist Church now has two Wikidata pages, one for the structure before the 1870s and one for the structure after.
Adding the new subject resulted in the following error:
Error adding subject: Error adding subject: duplicate key value violates unique constraint "images_subject_slug_key" DETAIL: Key (slug)=(first-african-baptist-church) already exists.
I changed the name of one Wikidata page to "Old First African Baptist Church" in an attempt to skirt around this, but I still receive the same error. Possibly due to an entry for Q137669759 already existing with an incompatible name in the db?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the subject import described in the issue and trace where the images_subject_slug_key constraint is enforced. Check how existing Wikidata subjects and renamed subjects are looked up, then verify that both historical church pages can be imported without the duplicate-slug error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100