fix: Account seeder error on staging (#5371)

- Fix for Account seeding error on staging environments
This commit is contained in:
Sojan Jose
2022-09-01 21:23:57 +05:30
committed by GitHub
parent 4a74ab59d2
commit 7f3f6f7129
7 changed files with 17 additions and 10 deletions

View File

@@ -10,7 +10,7 @@
class Seeders::AccountSeeder
def initialize(account:)
raise 'Account Seeding is not allowed in production.' if Rails.env.production?
raise 'Account Seeding is not allowed.' unless ENV.fetch('ENABLE_ACCOUNT_SEEDING', !Rails.env.production?)
@account_data = HashWithIndifferentAccess.new(YAML.safe_load(File.read(Rails.root.join('lib/seeders/seed_data.yml'))))
@account = account

View File

@@ -10,7 +10,7 @@
class Seeders::InboxSeeder
def initialize(account:, company_data:)
raise 'Inbox Seeding is not allowed in production.' if Rails.env.production?
raise 'Inbox Seeding is not allowed in production.' unless ENV.fetch('ENABLE_ACCOUNT_SEEDING', !Rails.env.production?)
@account = account
@company_data = company_data

View File

@@ -351,11 +351,11 @@ contacts:
- message_type: incoming
content: "Hey, \n My card is not working on your website. Please help"
- name: "Candice Matherson"
email: "cmathersonj@va.gov"
email: "cmathersonj@va.test"
gender: 'female'
conversations:
- channel: Channel::Email
source_id: "cmathersonj@va.gov"
source_id: "cmathersonj@va.test"
assignee: michael_scott@paperlayer.test
messages:
- message_type: incoming