智能组卷应排除未发布的编程题

dev_new_shixunsrepository
cxt 5 years ago
parent 00bb86130d
commit bb5dcfd7e3

@ -19,7 +19,7 @@ class OptionalItemQuery < ApplicationQuery
end
if hacks.present?
items = ItemBank.where(container_id: hacks.pluck(:id), container_type: "Hack").or(ItemBank.where(id: items.pluck(:id)))
items = ItemBank.where(container_id: hacks.where(status: 1).pluck(:id), container_type: "Hack").or(ItemBank.where(id: items.pluck(:id)))
end
public = source.present? ? source.to_i : 1

Loading…
Cancel
Save