We're updating the issue view to help you get more done. 

SerialWork after_destroy callback causes an error when the series is missing.

Description

There's a draft that can't be deleted as a result of a SerialWork where the series was somehow deleted. It's not clear what caused this (possibly a race condition?), but it would be good to make sure that the SerialWork destroy callbacks can handle this case without throwing an error.

In order to test this, you need to delete a SerialWork with a missing series. The only way I know to do that is as follows:

  1. Create a work.

  2. Add a new series to that work.

  3. Find the ID for that series.

  4. Go into the rails console and call Series.find(id).delete.

  5. View the work, press the "Edit" button, and then press "Delete Work."

Environment

Status

Assignee

ticking instant

Reporter

ticking instant

Roadmap

Series

Priority

Medium

Affects versions

0.9.228

Fix versions

Components

BackEnd

Difficulty

Medium

Required Access Level

Admin

Milestone

Internal 0.9