1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

(bug) private method create_statistic_subtype

This commit is contained in:
Sylvain 2023-02-02 15:48:58 +01:00
parent 4d942b4161
commit aee2c68485
3 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
# Changelog Fab-manager
- Optimized memory consumption in statistics fetcher service
- Fix a bug: private method `create_statistic_subtype'
- [TODO DEPLOY] `rails db:seed`
## v5.6.9 2023 February 02

View File

@ -22,7 +22,7 @@ Sentry.init do |config|
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production.
config.traces_sample_rate = 0.1
config.traces_sample_rate = 0.01
config.environment = Rails.env
config.release = Version.current
end

View File

@ -145,7 +145,7 @@ end
Plan.find_each do |plan|
type = plan.find_statistic_type
subtype = if StatisticSubType.find_by(key: plan.slug).nil?
plan.create_statistic_subtype
StatisticSubType.create!(key: plan.slug, label: plan.name)
else
StatisticSubType.find_by(key: plan.slug)
end