-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging two documents with digital content footnotes for the same source results in unique constraint violation #1394
Comments
@blms I merged PGPIDs 5200 and 5201 - they were duplicates, with the same transcription (from the same source) split verso and recto (verso on one PGPID, recto on the other). So the text was different on each one, but the source was the exact same. I was able to merge but one of the transcriptions disappeared. |
Confirmed locally that the footnote and annotation from the merged document are both deleted, so it would seem in some cases the footnote is deleted instead of an attempted reassignment. Thanks Ksenia for documenting! Working on a fix now. |
Looks like both bugs are a result of this logic: geniza/geniza/corpus/models.py Lines 1362 to 1368 in 65660de
geniza/geniza/footnotes/models.py Lines 432 to 449 in 65660de
It looks like Marina's failed because the notes field didn't match. When adding notes to one of those two footnotes for 5200 and 5201, I see that my merge also fails locally with the same error. Whereas when the notes are identical, they are treated as "the same footnote" and one is discarded.
|
Also copy any missing attributes (notes, location, url) ref #1394
Fix document merge function footnote bugs (#1394)
@blms the doubled transcription content (with the slight differences) is confusing, but I'm not sure there's a way around it (perhaps creating a different entry for the source and thus a different transcription dropdown entirely)? Closing, as this works, just need to bring it up at the next PM meeting. |
testing notes (QA)
On the QA site admin:
dev notes
There is an interesting edge case where one document, PGPID 4474, has a transcription from Geoffrey Khan. Another PGPID, 29344, was created and refers to the same fragment/images. This second PGPID also has the transcription sourced from Khan, but with emendations by Yusuf.
An attempt to merge these two documents into 4474 results in a unique constraint violation:
The solution here is either to discard Khan's original transcription and replace it with the emended one, or to take Yusuf's emendations and consider them a separate source, reassign the source, then perform the merge.
But it is possible this error could happen again, so it would be helpful to show a more explanatory error message and give the user those two options to consider.
The text was updated successfully, but these errors were encountered: