diff options
author | David Gay <david@davidgay.org> | 2021-06-23 20:26:53 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-23 20:26:53 -0400 |
commit | 18bed0ce80b608b8188abae137175f07c3659bb2 (patch) | |
tree | 705c5e2cd6ec3d3b003923d3f84f46ad6ee96f27 /app/lib | |
parent | c608468b7d6dad0a007ce1031724737b02fbdd55 (diff) |
Fix activities without requirements not completing
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/activity_processor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/activity_processor.rb b/app/lib/activity_processor.rb index 6509b44..d995e06 100644 --- a/app/lib/activity_processor.rb +++ b/app/lib/activity_processor.rb @@ -121,7 +121,7 @@ class ActivityProcessor # But just something to keep in mind. # Note: This will result in equipment being checked twice if it provides two speed stats. # Fine for now since no equipment gives two skill speed stats, but may want to refine in the future. - if @activity.whatnot[:requirements].any? + if @activity.whatnot[:requirements]&.any? required_skill_gids = @activity.whatnot[:requirements].select { |r| r[:type] == "skill" }.map { |r| r[:gid] }.uniq required_skill_gids.each do |required_skill_gid| skill = Skill.find_by_gid(required_skill_gid) |