summaryrefslogtreecommitdiff
path: root/app/workers/issue_rebalancing_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/issue_rebalancing_worker.rb')
-rw-r--r--app/workers/issue_rebalancing_worker.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/workers/issue_rebalancing_worker.rb b/app/workers/issue_rebalancing_worker.rb
index 032ba5534e6..a9ad66198f3 100644
--- a/app/workers/issue_rebalancing_worker.rb
+++ b/app/workers/issue_rebalancing_worker.rb
@@ -11,7 +11,8 @@ class IssueRebalancingWorker
return if project_id.nil?
project = Project.find(project_id)
- issue = project.issues.first # All issues are equivalent as far as we are concerned
+ # All issues are equivalent as far as we are concerned
+ issue = project.issues.take # rubocop: disable CodeReuse/ActiveRecord
IssueRebalancingService.new(issue).execute
rescue ActiveRecord::RecordNotFound, IssueRebalancingService::TooManyIssues => e