diff options
-rw-r--r-- | lib/scheduler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scheduler.rb b/lib/scheduler.rb index 217a0a5..76a77f6 100644 --- a/lib/scheduler.rb +++ b/lib/scheduler.rb @@ -3,7 +3,7 @@ class Scheduler projects = Project.where(always_build: true).all projects.each do |project| last_commit = project.commits.last - next unless last_commit + next unless last_commit && last_commit.last_build interval = project.polling_interval if (last_commit.last_build.created_at + interval.hours) < Time.now |