Project

General

Profile

Actions

Bug #12884

closed

Import subnets from smart proxy fails with "Can't mass-assign protected attributes for Subnet: dhcp"

Added by Tomer Brisker almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

Full stack:

ActiveModel::MassAssignmentSecurity::Error in SubnetsController#import
Can't mass-assign protected attributes for Subnet: dhcp

Extracted source (around line #196):

      next if exists?(attrs)
      attrs.merge!(parse_dhcp_options(s['options'])) if s['options'].present?
      new(attrs.update(:dhcp => proxy))
    end.compact
  end

Rails.root: /home/tbrisker/foreman

Application Trace | Framework Trace | Full Trace
app/models/subnet.rb:196:in `block in import'
app/models/subnet.rb:190:in `map'
app/models/subnet.rb:190:in `import'
app/controllers/subnets_controller.rb:61:in `import'
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
Request

Parameters:

{"smart_proxy_id"=>"3-proxy-localdomain-net"}


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #7568: Use attr_accessible for rails 4 upgradeClosedDaniel Lobato Garcia09/22/2014Actions
Actions

Also available in: Atom PDF