Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
FIX little mess in setup_generator
Browse files Browse the repository at this point in the history
  • Loading branch information
a-barbieri committed Mar 26, 2018
1 parent d520858 commit 69dcbae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/generators/binda/setup/setup_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69dcbae

Please sign in to comment.