NoMethodError in ShelfController#category

undefined method `listtype=' for nil:NilClass

Extracted source (around line #554):
552
553
554
555
556
557
              
shelf = getshelf
# logger.debug "Category: shelf=#{shelf}"
shelf.listtype = params[:list]
categories = Set.new
shelf.entries.each { |entry|

Rails.root: /app

Application Trace | Framework Trace | Full Trace

Request

Parameters:

{"list"=>"image", "shelfname"=>"%E3%81%BF%E3%81%8B%E3%82%93%EF%BC%88%E3%81%9F%E8%A1%8C%E3%80%9C%E3%82%A2%E3%83%B3%E3%82%BD%E3%83%AD%E3%82%B8%E3%83%BC%EF%BC%89"}

Response

Headers:

None