|
@@ -587,8 +587,9 @@ func AttachmentsByDatasetOption(datasets []int64, opts *SearchDatasetOptions) ([ |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
attachments := make([]*Attachment, 0) |
|
|
attachments := make([]*Attachment, 0) |
|
|
if err := sess.Table(&Attachment{}).Where(cond). |
|
|
|
|
|
|
|
|
if err := sess.Table(&Attachment{}).Where(cond).Desc("id"). |
|
|
Find(&attachments); err != nil { |
|
|
Find(&attachments); err != nil { |
|
|
return nil, fmt.Errorf("Find: %v", err) |
|
|
return nil, fmt.Errorf("Find: %v", err) |
|
|
} |
|
|
} |
|
|