diff --git a/db/seeds.rb b/db/seeds.rb index 11cb350a0..e80f0d17a 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -55,13 +55,19 @@ def create_objects(type, seed) seeds = expand_communities(type, seed) seeds = expand_ids(type, seeds) + objs = [] + # Actually create the objects and count successes - objs = type.create seeds + begin + objs = type.create seeds + rescue + objs.inspect + end skipped = objs.select { |o| o.errors.any? }.size created = objs.select { |o| !o.errors.any? }.size - [created, skipped] + [created, skipped] end def ensure_system_user_abilities