diff --git a/models/attachment.go b/models/attachment.go index c7d058651..a3fc6fa01 100755 --- a/models/attachment.go +++ b/models/attachment.go @@ -571,8 +571,8 @@ func Attachments(opts *AttachmentsOptions) ([]*AttachmentInfo, int64, error) { } if opts.JustNeedZipFile { - var DecompressState []int - DecompressState = append(DecompressState, 1, 2, 3) + var DecompressState []int32 + DecompressState = append(DecompressState, DecompressStateDone, DecompressStateIng, DecompressStateFailed) cond = cond.And( builder.In("attachment.decompress_state", DecompressState), ) diff --git a/routers/repo/dataset.go b/routers/repo/dataset.go index 11bd99149..d23722372 100755 --- a/routers/repo/dataset.go +++ b/routers/repo/dataset.go @@ -308,7 +308,6 @@ func CurrentRepoDataset(ctx *context.Context) { return } datasetIDs = append(datasetIDs, dataset.ID) - uploaderID := ctx.User.ID datasets, count, err := models.Attachments(&models.AttachmentsOptions{ ListOptions: models.ListOptions{ Page: page, @@ -317,7 +316,6 @@ func CurrentRepoDataset(ctx *context.Context) { Keyword: keyword, NeedDatasetIDs: true, DatasetIDs: datasetIDs, - UploaderID: uploaderID, Type: cloudbrainType, NeedIsPrivate: false, JustNeedZipFile: true,