mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 14:08:32 +08:00
FIX: Only seed general category on new sites (#18130)
* FIX: Only seed general category on new sites If the site already has human users (users with an id > 0) don't seed the categories. Follow up to: a6ad74c759f8e4f785dbcdb38c05f78d43c4128f * use human_users scope
This commit is contained in:
@ -128,6 +128,8 @@ module SeedData
|
||||
end
|
||||
|
||||
def should_create_category?(category_id, force_existence)
|
||||
return false if User.human_users.any?
|
||||
|
||||
if category_id > 0
|
||||
force_existence ? !Category.exists?(category_id) : false
|
||||
else
|
||||
|
Reference in New Issue
Block a user