Skip to content
Snippets Groups Projects
Commit c8d1ca7a authored by Jasper Maes's avatar Jasper Maes
Browse files

Fix deprecation: Passing ActiveRecord::Base objects to sanitize_sql_hash_for_assignment

parent 07e079e8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -57,7 +57,7 @@ module Labels
def update_issuables(new_label, label_ids)
LabelLink
.where(label: label_ids)
.update_all(label_id: new_label)
.update_all(label_id: new_label.id)
end
# rubocop: enable CodeReuse/ActiveRecord
 
Loading
Loading
@@ -65,7 +65,7 @@ module Labels
def update_resource_label_events(new_label, label_ids)
ResourceLabelEvent
.where(label: label_ids)
.update_all(label_id: new_label)
.update_all(label_id: new_label.id)
end
# rubocop: enable CodeReuse/ActiveRecord
 
Loading
Loading
@@ -73,7 +73,7 @@ module Labels
def update_issue_board_lists(new_label, label_ids)
List
.where(label: label_ids)
.update_all(label_id: new_label)
.update_all(label_id: new_label.id)
end
# rubocop: enable CodeReuse/ActiveRecord
 
Loading
Loading
@@ -81,7 +81,7 @@ module Labels
def update_priorities(new_label, label_ids)
LabelPriority
.where(label: label_ids)
.update_all(label_id: new_label)
.update_all(label_id: new_label.id)
end
# rubocop: enable CodeReuse/ActiveRecord
 
Loading
Loading
---
title: 'Fix deprecation: Passing ActiveRecord::Base objects to sanitize_sql_hash_for_assignment'
merge_request: 23818
author: Jasper Maes
type: other
Loading
Loading
@@ -116,7 +116,7 @@ module API
end
 
MergeRequest.where(source_project: @project, source_branch: ref)
.update_all(head_pipeline_id: pipeline) if pipeline.latest?
.update_all(head_pipeline_id: pipeline.id) if pipeline.latest?
 
present status, with: Entities::CommitStatus
rescue StateMachines::InvalidTransition => e
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment