FIX: db:create was failing due to site settings
This commit is contained in:
parent
7f21892ad0
commit
54c0aa788c
|
@ -57,12 +57,12 @@ class SiteSettings::DbProvider
|
|||
# table is not in the db yet, initial migration, etc
|
||||
def table_exists?
|
||||
@table_exists ||= {}
|
||||
|
||||
unless @table_exists[current_site]
|
||||
@table_exists[current_site] = ActiveRecord::Base.connection.table_exists?(@model.table_name)
|
||||
begin
|
||||
@table_exists[current_site] ||= ActiveRecord::Base.connection.table_exists?(@model.table_name)
|
||||
rescue
|
||||
STDERR.puts "No connection to db, unable to retrieve site settings! (normal when running db:create)"
|
||||
@table_exists[current_site] = false
|
||||
end
|
||||
|
||||
@table_exists[current_site]
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue