Project

General

Profile

Actions

Bug #20558

closed

Seed fails when anonymous provider is already present

Added by Lukas Zapletal over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Upgrades
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

A customer is hitting "ActiveRecord::RecordInvalid: Validation failed: Providers is invalid" during "db/seeds.d/102-organizations.rb". Futher investigation reveals that create_anonymous_provider is called when there is already anonymous provider present. They had anonymous but not redhat, perhaps they run into issues during migration or script during their upgrade.

We don't know how this happened, but this is not important. What's important that the 102-organizations.rb seed script is supposed to be idempotent, there is a big banner at the top, but these lines are definitely not idempotent. My patch will fix that.

Actions

Also available in: Atom PDF