Skip to content

Fix editionauthor display by prioritizing work authors#12219

Draft
velmurugan5555 wants to merge 4 commits intointernetarchive:masterfrom
velmurugan5555:master
Draft

Fix editionauthor display by prioritizing work authors#12219
velmurugan5555 wants to merge 4 commits intointernetarchive:masterfrom
velmurugan5555:master

Conversation

@velmurugan5555
Copy link
Copy Markdown

Closes #486

fix

Technical

Updated Edition.get_authors method to return work authors when available instead of combining work and edition authors. This ensures consistent author data is used for rendering cover alt-text.

Testing

  1. Open a book edition page
  2. Check the cover alt-text
  3. Verify that the author name matches the work author
  4. Ensure no duplicate or incorrect author names are displayed

Screenshot

Stakeholders

@cdrini

Comment on lines +59 to +63
if self.works:
return self.works[0].get_authors()

authors = [follow_redirect(a) for a in self.authors]
return [a for a in authors if a and a.type.key == "/type/author"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this indentation is flat our wrong and shouldn't work which makes be believe this code has not been tested locally

@mekarpeles mekarpeles marked this pull request as draft April 1, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edition's bookcover alt-text should pull author from work

3 participants