internetarchive / internetarchive/openlibrary

Error on OL when IA item removed or invalid

Open
#5,693 0 comments 0 reactions 0 assignees View on GitHub
Affects: Experience Lead: @seabelis Priority: 3 Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

`/openlibrary/openlibrary/templates/type/work/view.html: error in processing template: TypeError: 'NoneType' object does not support item assignment (falling back to default template)` displays if the default Open Library edition record for a work links to an IA item that has been removed or is invalid.

### Evidence / Screenshot (if possible)

### Relevant url?

### Steps to Reproduce

1. Go to ...an Open Library work that has the default edition that links to an invalid IA identifier
2. Do ...see error

* Actual: error
* Expected: page should load without error regardless of IA item's status

### Details

- **Logged in (Y/N)?**
- **Browser type/version?**
- **Operating system?**
- **Environment (prod/dev/local)?** prod

### Proposal & Constraints

### Related files

### Stakeholders

@mekarpeles @cdrini @jimchamp

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.