Project

General

Profile

Bug #12884

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

Added by Tomer Brisker over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Team Backlog:
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

Related to Foreman - Bug #7568: Use attr_accessible for rails 4 upgradeClosed2014-09-22

Associated revisions

Revision e42c1105 (diff)
Added by Tomer Brisker over 3 years ago

Fixes #12884 - Allow importing subnets from smart proxy

History

#1 Updated by Tomer Brisker over 3 years ago

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

#2 Updated by The Foreman Bot over 3 years ago

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

#3 Updated by Dominic Cleal over 3 years ago

  • Legacy Backlogs Release (now unused) set to 71

#4 Updated by Anonymous over 3 years ago

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

Also available in: Atom PDF