From 69373d3def34f9056e0fe751fd0ebc196070fc7c Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 13 Jul 2020 17:27:18 +0200 Subject: [PATCH] [bug] unable to seed the database --- CHANGELOG.md | 16 +--------------- db/seeds.rb | 2 +- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0117c7bb1..9f56d4ba4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,6 @@ # Changelog Fab-manager -## v4.5.2 2020 July 1st - -- Fix a bug: unable to set stripe public key in production -- Fix a bug: health API is broken if ElasticSearch is not present -- Fix a bug: unable to sync members with stripe -- Fix a bug: version check is not working -- Fix a bug: enabling auth_provider from the tests happens twice in coverall context -- [TODO DEPLOY] `rails fablab:maintenance:clean_workers` - -## v4.5.1 2020 July 1st - -- Ability to run the upgrade without interactions -- Fix a bug: Unable to access the invoices section if no stripe key was set or incorrect -- Fix a bug: task env_to_db overrides the values set in the UI, even if the corresponding variable was not defined in the env file +- Fix a bug: unable to seed the database ## v4.5.0 2020 June 30 @@ -37,7 +24,6 @@ - Fix a security issue: updated rack to 2.2.3 to fix [CVE-2020-8184](https://nvd.nist.gov/vuln/detail/CVE-2020-8184) - [TODO DEPLOY] add the `POSTGRESQL_LANGUAGE_ANALYZER` environment variable (see [doc/environment.md](doc/environment.md#POSTGRESQL_LANGUAGE_ANALYZER) for configuration details) - [TODO DEPLOY] `rails fablab:setup:env_to_db` -- [TODO DEPLOY] `rails db:seed` - [TODO DEPLOY] `\curl -sSL https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/redis-upgrade.sh | bash` - [TODO DEPLOY] -> (only dev) upgrade redis to v6, you may be able to use the script above, depending on your installation diff --git a/db/seeds.rb b/db/seeds.rb index 32a798a6c..6323770f1 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -603,7 +603,7 @@ Setting.set('invoice_VAT-active', false) unless Setting.find_by(name: 'invoice_V Setting.set('invoice_VAT-rate', 20.0) unless Setting.find_by(name: 'invoice_VAT-rate').try(:value) -Setting.set('invoice_text', t('invoices.invoice_text_example')) unless Setting.find_by(name: 'invoice_text').try(:value) +Setting.set('invoice_text', I18n.t('invoices.invoice_text_example')) unless Setting.find_by(name: 'invoice_text').try(:value) unless Setting.find_by(name: 'invoice_legals').try(:value) setting = Setting.find_or_initialize_by(name: 'invoice_legals')