From 815df50ad1f410756a66b533fe77b7fe78a77dc9 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Aug 2019 18:54:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/graduation_works_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/graduation_works_controller.rb b/app/controllers/graduation_works_controller.rb index e9e07cc0d..204e0e5d4 100644 --- a/app/controllers/graduation_works_controller.rb +++ b/app/controllers/graduation_works_controller.rb @@ -274,7 +274,7 @@ class GraduationWorksController < ApplicationController @is_author = @work.user_id == current_user.id @work_members = @task.task_type == 1 ? [] : @task.graduation_works.where.not(user_id: @work.user_id). where(group_id: @work.group_id).includes(:user) - @attachments = @work.attachments.where.not(attachtype: 7).or(attachtype: nil) + @attachments = @work.attachments.where("attachtype != 7 or attachtype is null") end def comment_list