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