From 9c460221646f6d7aefc469341c76118144d9abb5 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 15 Feb 2022 17:54:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=B8=8A=E4=BC=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E7=9A=84=E9=80=9A=E7=9F=A5=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/attachment.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/repo/attachment.go b/routers/repo/attachment.go index dc15be9f1..91c0e7d28 100755 --- a/routers/repo/attachment.go +++ b/routers/repo/attachment.go @@ -845,8 +845,9 @@ func CompleteMultipart(ctx *context.Context) { ctx.Error(500, fmt.Sprintf("InsertAttachment: %v", err)) return } - - notification.NotifyUploadAttachment(ctx.User, ctx.Repo.Repository, attachment) + dataset, _ := models.GetDatasetByID(attachment.DatasetID) + repository, _ := models.GetRepositoryByID(dataset.RepoID) + notification.NotifyUploadAttachment(ctx.User, repository, attachment) if attachment.DatasetID != 0 { if isCanDecompress(attachment.Name) { @@ -867,7 +868,6 @@ func CompleteMultipart(ctx *context.Context) { labelmsg.SendDecompressAttachToLabelOBS(string(attachjson)) } } else { - dataset, _ := models.GetDatasetByID(attachment.DatasetID) var labelMap map[string]string labelMap = make(map[string]string) labelMap["UUID"] = uuid