From 83dc605c260e1472f51811295741d525b4627ab1 Mon Sep 17 00:00:00 2001 From: yystopf Date: Fri, 27 Sep 2024 15:04:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=A6=82=E8=A7=88=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 0b861655e..4724224e8 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -366,7 +366,7 @@ class ProjectsController < ApplicationController if @project_detail.save! attachment_ids = Array(params[:attachment_ids]) logger.info "=============> #{Array(params[:attachment_ids])}" - @attachments = Attachment.where(id: attachment_ids) + @attachments = Attachment.where(id: attachment_ids).or(Attachment.where(uuid: attachment_ids)) @attachments.update_all( container_id: @project_detail.id, container_type: @project_detail.model_name.name,