Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

[hydrus/stage] ActionView::Template::Error: undefined method `split' for nil:NilClass #280

Open
jcoyne opened this issue Apr 1, 2019 · 1 comment

Comments

@jcoyne
Copy link
Contributor

jcoyne commented Apr 1, 2019

Backtrace

line 550 of [PROJECT_ROOT]/app/models/hydrus/item.rb: end_of_embargo_range
line 526 of [PROJECT_ROOT]/app/models/hydrus/item.rb: embargo_date_in_range
line 20 of [PROJECT_ROOT]/app/models/hydrus/validatable.rb: validate!

View full backtrace and more info at honeybadger.io

This can occur when you create a collection with an embargo date, then create an item within that collection, then change the collection embargo to "none" and then try to view the item that was created.

To prevent something like this we need to change one of the following:

  1. the item should copy the embargo from the collection at create time
  2. When the embargo settings on a collection are changed, then change all of the member items.
@hannahfrost
Copy link
Contributor

Solution to this must take into account the additional flexibility afforded by the embargo configuration possibilities in Hydrus at collection and item levels: embargo can be determined at the collection level with a pre-set value (including none) or can be variable at the item-level up to a specified period from the time of deposit.

Given this potential variability over item objects and collection objects over time, form-level validation (at time of object submission only) may be the better approach than model-level validation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants