Explorar el Código

Fix index not being used in Status.reblogs_map (#11982)

Regression from #11623
master^2
Eugen Rochko hace 4 años
committed by GitHub
padre
commit
32ff78f749
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      app/models/status.rb

+ 1
- 1
app/models/status.rb Ver fichero

@@ -305,7 +305,7 @@ class Status < ApplicationRecord
end

def reblogs_map(status_ids, account_id)
select('reblog_of_id').where(reblog_of_id: status_ids).where(account_id: account_id).reorder(nil).each_with_object({}) { |s, h| h[s.reblog_of_id] = true }
select('reblog_of_id').where(reblog_of_id: status_ids).where(account_id: account_id).unscoped.each_with_object({}) { |s, h| h[s.reblog_of_id] = true }
end

def mutes_map(conversation_ids, account_id)


Cargando…
Cancelar
Guardar