Skip to content

Commit

Permalink
temp commit to inspect what's wrong with seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
Oaphi committed Jan 15, 2025
1 parent 86b8639 commit d5d4ab7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5d4ab7

Please sign in to comment.