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 about 8 years ago. Updated over 5 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 #1

Updated by Tomer Brisker about 8 years ago

  • Related to Bug #7568: Use attr_accessible for rails 4 upgrade added
Actions #2

Updated by The Foreman Bot about 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2992 added
Actions #3

Updated by Dominic Cleal about 8 years ago

  • translation missing: en.field_release set to 71
Actions #4

Updated by Anonymous about 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF