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 about 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

Also available in: Atom PDF