NoMethodError in Web#web_product

Showing /var/www/vhosts/castillodemuros.com/castillodemuros_old/app/views/web/web_product.html.erb where line #410 raised:

undefined method `color' for nil:NilClass

Extracted source (around line #410):

407:     			<% if @product.variation %>
408:     			<h5>Modelo</h5>
409: 
410:     			<% if @product.product_variations.first.color.present? %>
411:     			<% product_colors = @product.product_variations.collect {|p| [ Brand.find(p.color).name, Brand.find(p.color).id ] } %>
412:     			<%= select("color", "id", product_colors.uniq, {include_blank: false}, :class => "selector_variante") %>
413:     			<% end %>

Rails.root: /var/www/vhosts/castillodemuros.com/castillodemuros_old

Application Trace | Framework Trace | Full Trace
app/views/web/web_product.html.erb:410:in `_app_views_web_web_product_html_erb__2275083004818594091_70155146459880'

Request

Parameters:

{"locale"=>"es",
 "id"=>"74-carburador-motosierra-husqvarna"}

Show session dump

Show env dump

Response

Headers:

None