diff --git a/db/fixtures/006_badges.rb b/db/fixtures/006_badges.rb index 6890d8a94..81bc91d19 100644 --- a/db/fixtures/006_badges.rb +++ b/db/fixtures/006_badges.rb @@ -30,12 +30,12 @@ BadgeGrouping.seed do |g| end # BUGFIX -Badge.exec_sql 'UPDATE badges +Badge.exec_sql "UPDATE badges SET badge_grouping_id = -1 WHERE NOT EXISTS ( SELECT 1 FROM badge_groupings g WHERE g.id = badge_grouping_id - )' + ) OR (id < 100 AND badge_grouping_id = #{BadgeGrouping::Other} )" # Trust level system badges. trust_level_badges = [