Skip to content

Handle orphaned editions passed to MergeUI record enhancer#11703

Merged
cdrini merged 5 commits intointernetarchive:masterfrom
mheiman:bugfix/merge-orphans
Feb 3, 2026
Merged

Handle orphaned editions passed to MergeUI record enhancer#11703
cdrini merged 5 commits intointernetarchive:masterfrom
mheiman:bugfix/merge-orphans

Conversation

@mheiman
Copy link
Collaborator

@mheiman mheiman commented Jan 18, 2026

Closes #11702 . Partially fixes #10966

Fixes the issue where MergeUI will crash if passed orphaned editions that have an authors field.

Technical

Limits author lookups to records with work-style authors fields.

Since edition authors aren't added to the primary work during merging, I'm not giving them the enhanced display that work authors get.

Testing

On testing you should be able to load https://openlibrary.org/works/merge?records=OL14857756W,OL24198259M and not crash MergeUI.

Stakeholders

@mheiman

@mekarpeles mekarpeles added the Priority: 1 Do this week, receiving emails, time sensitive, . [managed] label Jan 26, 2026
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! One change to avoid relying on the differing author shape between works/editions ; if we want to handle them separately, we should specifically check the object type. But in these cases I think it's ok if they're seen the same.

@cdrini
Copy link
Collaborator

cdrini commented Feb 3, 2026

Tested on testing and worked like a charm! This also partially addressed the issue with work authors being malformatted and missing

@cdrini cdrini merged commit 8464674 into internetarchive:master Feb 3, 2026
4 checks passed
lokesh pushed a commit to lokesh/openlibrary that referenced this pull request Feb 4, 2026
…phans

Handle orphaned editions passed to MergeUI record enhancer
bhardwajparth51 added a commit to bhardwajparth51/openlibrary that referenced this pull request Feb 17, 2026
…phans

Handle orphaned editions passed to MergeUI record enhancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: 1 Do this week, receiving emails, time sensitive, . [managed]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orphaned editions passed to MergeUI crashing script Cannot merge works if a work has no author

3 participants