summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2021-09-06 18:33:14 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2021-09-06 18:33:14 +0000
commit55ce8de0aea23397aafdee68e4e7be1beb6089a9 (patch)
treedd8c500a587abd8865b889ccb00ede1329ff55b0 /app
parent4378b7e1b47311aa1f7cf4992321dc0cbd9e5830 (diff)
downloadredmine-55ce8de0aea23397aafdee68e4e7be1beb6089a9.tar.gz
redmine-55ce8de0aea23397aafdee68e4e7be1beb6089a9.zip
Use ids instead of pluck(:id) (#32977).
git-svn-id: http://svn.redmine.org/redmine/trunk@21208 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 62e95a696..cb0ad9e3a 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -952,7 +952,7 @@ class User < Principal
Watcher.where('user_id = ?', id).delete_all
WikiContent.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
WikiContentVersion.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
- user_custom_field_ids = CustomField.where(field_format: 'user').pluck(:id)
+ user_custom_field_ids = CustomField.where(field_format: 'user').ids
if user_custom_field_ids.any?
CustomValue.where(custom_field_id: user_custom_field_ids, value: self.id.to_s).delete_all
end