Bug #15871

Migration fails when standard roles are deleted

Added by Lukas Zapletal about 1 year ago. Updated about 1 year ago.

Status:Closed
Priority:Normal
Assigned To:Lukas Zapletal
Category:Discovery plugin
Target version:Plugin 6.0
Difficulty: Pull request:https://github.com/theforeman/foreman_discovery/pull/290
Bugzilla link:
Story points-
Velocity based estimate-

Description

When they are missing, getting:

undefined method `add_permissions!' for nil:NilClass
/home/lzap/work/foreman_discovery/db/migrate/20160719124942_add_missing_view_permissions.rb:9:in `up'
/home/lzap/.rbenv/versions/2.3.1/bin/bundle:23:in `load'
/home/lzap/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>'
NoMethodError: undefined method `add_permissions!' for nil:NilClass
/home/lzap/work/foreman_discovery/db/migrate/20160719124942_add_missing_view_permissions.rb:9:in `up'
/home/lzap/.rbenv/versions/2.3.1/bin/bundle:23:in `load'
/home/lzap/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate

Associated revisions

Revision 3af1f18d
Added by Lukas Zapletal about 1 year ago

Fixes #15871 - role permissions migration fixed

History

#1 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman_discovery/pull/290 added

#2 Updated by Anonymous about 1 year ago

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

Also available in: Atom PDF