Project

General

Profile

Actions

Bug #16144

closed

container_request missing nil checks

Added by Peter Amstutz almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Story points:
-
Release relationship:
Auto

Description

1. in models/container_request.rb#update_collections

manifest = Collection.where(portable_data_hash: pdh).first.manifest_text

Fails if pdh is non-nil but not found.

2. in models/container_request.rb#finalize_if_needed

      c = Container.find_by_uuid(container_uuid)
      c.lock!

Fails if container_uuid is not found.

Also, if the container_request is being destroyed, finalize_if_needed should be skipped. (It is an after_save hook, do those run on destroy?)


Subtasks 1 (0 open1 closed)

Task #16145: Review 16144-nil-checksResolvedPeter Amstutz02/11/2020Actions
Actions

Also available in: Atom PDF