MapRVA / MapRVA/yesterdays

Subjects cannot have the same name, blocks import after name is changed

Open
#84 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

subjects
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.

Image

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.