This repository was archived by the owner on Jul 24, 2020. It is now read-only.
This repository was archived by the owner on Jul 24, 2020. It is now read-only.
Unable to update equipment_models which have no checkin/out procedures #558
Closed
Description
Commit 78ef7bf for #470 needs a check to ensure we're not calling phase_params.each on an empty phase_params.
def delete_procedures(params, phase)
# phase needs to be equal to either "checkout" or "checkin"
phase_params = params[:equipment_model][:"#{phase}_procedures_attributes"]
phase_params.each do |k, v|
Currently on Development, updating an equipment model which does not have any checkin or checkout procedures fails (EDIT: either no checkin procedures OR no checkout procedures, or none of either), on account of cannot call .each on NIL.
This is a pretty severe bug; it should frankly be backported to 3.2.x, but it's also probably it won't affect most of our clients, given the improbability of having equipment with no in/out procedures. But still.
Activity