ActiveRecord::RecordNotFound in WebController#web_subcategory

Couldn't find Category with id=

Extracted source (around line #337):
335
336
337
338
339
340
          
if Category.first.present?
if Category.first.levels == 3
@principal2 = Category.find(Category.find(@category_id).ancestry.partition("/").last)
else
@principal2 = Category.find(Category.find(@category_id).ancestry.first)
end

Rails.root: /var/www/vhosts/calzadosseijas.com/calzadosseijas

Application Trace | Framework Trace | Full Trace
app/controllers/web_controller.rb:337:in `web_subcategory'

Request

Parameters:

{"id"=>"13_deportivas-para-hombre"}

Response

Headers:

None