Skip to content

Conversation

@thedhanawada
Copy link
Contributor

When list items are redirects, the notes were being lost during redirect resolution in get_seeds() method. This fix preserves the original notes by creating an AnnotatedSeed with both the resolved document and the original notes.

What issue does this PR close? - Closes #9600

What does this PR achieve? - fix

Technical

This fixes a bug where list notes disappear when books are redirects. The original code was creating a new Seed without keeping the notes when resolving redirects. My fix saves the original notes first, then creates the new Seed with both the resolved book and the saved notes.

Changed file: openlibrary/core/lists/model.py (lines 322-330)

Testing

I wasn't able to create redirect scenarios in the development environment, but I verified the logic preserves original_notes before redirect resolution and creates an AnnotatedSeed with both the resolved document and original notes.

Screenshot

This is a backend fix that doesn't change UI elements directly, but prevents notes from disappearing on list items that are redirects.

Stakeholders

@cdrini

  When list items are redirects, the notes were being lost during redirect
  resolution in get_seeds() method. This fix preserves the original notes
  by creating an AnnotatedSeed with both the resolved document and the
  original notes.

  Fixes internetarchive#9600
@github-actions github-actions bot added the Priority: 2 Important, as time permits. [managed] label Aug 11, 2025
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.

Nice, great work and approach @thedhanawada , works like a charm!

@cdrini cdrini merged commit 3bbeccc into internetarchive:master Aug 25, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: 2 Important, as time permits. [managed]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List notes don't appear if the list item becomes a redirect

2 participants