Commit e08bac9ffe98db2e3c1adda80f9deb979b3769fe
Committed by
Antonio Terceiro
1 parent
be2e60f8
Exists in
master
and in
29 other branches
ActionItem1049: anhetegua script must delay removal of environments
environments must be removed after Users and Profiles that belongs to them for the cache sweeper not crash
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
script/anhetegua
@@ -4,13 +4,13 @@ require 'console_with_helpers' | @@ -4,13 +4,13 @@ require 'console_with_helpers' | ||
4 | 4 | ||
5 | GetText.locale = 'pt_BR' | 5 | GetText.locale = 'pt_BR' |
6 | 6 | ||
7 | -Environment.destroy_all | ||
8 | User.destroy_all | 7 | User.destroy_all |
9 | Profile.destroy_all | 8 | Profile.destroy_all |
10 | 9 | ||
11 | Category.destroy_all | 10 | Category.destroy_all |
12 | Product.destroy_all | 11 | Product.destroy_all |
13 | Article.destroy_all | 12 | Article.destroy_all |
13 | +Environment.destroy_all | ||
14 | 14 | ||
15 | def new_category(parent, name, color = nil) | 15 | def new_category(parent, name, color = nil) |
16 | category = Environment.default.categories.build(:name => name, :display_color => color, :parent_id => (parent ? parent.id: nil), :display_in_menu => true) | 16 | category = Environment.default.categories.build(:name => name, :display_color => color, :parent_id => (parent ? parent.id: nil), :display_in_menu => true) |