diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 320c8fc93..1ed40f691 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -93,7 +93,7 @@ class FilesController < ApplicationController if sort == "" sort = "created_on DESC" end - resultSet = Attachment.where("attachments.container_type IS NOT NULL AND filename LIKE :like ", like: "%#{keywords}%"). + resultSet = Attachment.where("attachments.container_type IS NOT NULL AND attachments.copy_from IS NULL AND filename LIKE :like ", like: "%#{keywords}%"). reorder(sort) end