Project

General

Profile

Actions

Bug #29433

closed

db:seed Fails with error "rake aborted! NoMethodError: undefined method `first' for nil:NilClass" when there are custom bookmarks created

Added by Tomer Brisker about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1543316

Upgrade Step: db_seed...
rake aborted!
NoMethodError: undefined method `first' for nil:NilClass
Seems to be there is an issue in bookmark related audit records. 
In some cases, fixing the initial check led to error "Unable to create bookmark: Name has already been taken"
Observed below logs:
/usr/share/foreman/db/seeds.d/15-bookmarks.rb:12:in `block (2 levels) in <top (required)>'
/usr/share/foreman/db/seeds.d/15-bookmarks.rb:10:in `each'
/usr/share/foreman/db/seeds.d/15-bookmarks.rb:10:in `block in <top (required)>'
Seeding /usr/share/foreman/db/seeds.d/15-bookmarks.rb
Actions #1

Updated by Tomer Brisker about 4 years ago

  • Subject changed from db:seed Fails with error "rake aborted! NoMethodError: undefined method `first' for nil:NilClass" when there are custom bookmarks created to db:seed Fails with error "rake aborted! NoMethodError: undefined method `first' for nil:NilClass" when there are custom bookmarks created
  • Category changed from Search to DB migrations
  • Priority changed from Urgent to High
Actions #2

Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ondřej Ezr
  • Pull request https://github.com/theforeman/foreman/pull/7597 added
Actions #3

Updated by The Foreman Bot almost 4 years ago

  • Fixed in Releases 2.1.0 added
Actions #4

Updated by Ondřej Ezr almost 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF