mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
(bug) unable to run when first setup Fab-manager
This commit is contained in:
parent
7fe495925c
commit
8369a66c7c
@ -1,5 +1,7 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
|
- Fix a bug: unable to run `rails db:seed` when first setup Fab-manager
|
||||||
|
|
||||||
## v5.6.11 2023 February 07
|
## v5.6.11 2023 February 07
|
||||||
|
|
||||||
- OpenAPI endpoint to fetch subscription data
|
- OpenAPI endpoint to fetch subscription data
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
# Some of them are just some placeholders to prevent having an empty palce when starting fab-manager first.
|
# Some of them are just some placeholders to prevent having an empty palce when starting fab-manager first.
|
||||||
# Other data are required default values, for various settings.
|
# Other data are required default values, for various settings.
|
||||||
|
|
||||||
Dir[Rails.root.join('db/seeds/**/*.rb')].sort.each do |seed|
|
load Rails.root.join('db/seeds/statistics.rb')
|
||||||
load seed
|
|
||||||
end
|
|
||||||
|
|
||||||
if Group.count.zero?
|
if Group.count.zero?
|
||||||
Group.create!([
|
Group.create!([
|
||||||
@ -27,6 +25,8 @@ if Role.where(name: 'admin').joins(:users).count.zero?
|
|||||||
admin.save!
|
admin.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
load Rails.root.join('db/seeds/settings.rb')
|
||||||
|
|
||||||
if Component.count.zero?
|
if Component.count.zero?
|
||||||
Component.create!([
|
Component.create!([
|
||||||
{ name: 'Silicone' },
|
{ name: 'Silicone' },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user