mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #2699 from eyalev/fix-db-seed-fu
name_lower can't be nil.
This commit is contained in:
commit
f753c15a30
@ -12,8 +12,8 @@ if SiteSetting.uncategorized_category_id == -1 || !Category.exists?(SiteSetting.
|
|||||||
end
|
end
|
||||||
|
|
||||||
result = Category.exec_sql "INSERT INTO categories
|
result = Category.exec_sql "INSERT INTO categories
|
||||||
(name,color,slug,description,text_color, user_id, created_at, updated_at, position)
|
(name,color,slug,description,text_color, user_id, created_at, updated_at, position, name_lower)
|
||||||
VALUES ('#{name}', 'AB9364', 'uncategorized', '', 'FFFFFF', -1, now(), now(), 1 )
|
VALUES ('#{name}', 'AB9364', 'uncategorized', '', 'FFFFFF', -1, now(), now(), 1, '#{name.downcase}' )
|
||||||
RETURNING id
|
RETURNING id
|
||||||
"
|
"
|
||||||
category_id = result[0]["id"].to_i
|
category_id = result[0]["id"].to_i
|
||||||
|
Loading…
Reference in New Issue
Block a user