diff --git a/lib/generators/binda/setup/setup_generator.rb b/lib/generators/binda/setup/setup_generator.rb index 85284640..78d9b74a 100644 --- a/lib/generators/binda/setup/setup_generator.rb +++ b/lib/generators/binda/setup/setup_generator.rb @@ -15,7 +15,11 @@ def setup_settings puts "Implement Binda settings" puts - dashboard_structure = Structure.find_or_create_by( slug: 'dashboard', instance_type: 'board' ) + if Structure.find_by(slug: 'dashboard').nil? + dashboard_structure = Structure.create!(name: 'dashboard', slug: 'dashboard', instance_type: 'board') + else + dashboard_structure = Structure.find_by(slug: 'dashboard') + end @dashboard = dashboard_structure.board # By default each structure has a field group which will be used to store the default field settings