Browse Source

Fixed bug: On init setups, seeds.rb isn't started.

Thorsten Eckel 9 years ago
parent
commit
76c22f0991
1 changed files with 4 additions and 1 deletions
  1. 4 1
      db/migrate/20150717000001_facebook_article_types.rb

+ 4 - 1
db/migrate/20150717000001_facebook_article_types.rb

@@ -1,6 +1,9 @@
 class FacebookArticleTypes < ActiveRecord::Migration
   def up
-    facebook_at      = Ticket::Article::Type.find_by( name: 'facebook' )
+    facebook_at = Ticket::Article::Type.find_by( name: 'facebook' )
+
+    return if !facebook_at
+
     facebook_at.name = 'facebook feed post'
     facebook_at.save