aboutsummaryrefslogtreecommitdiffstats
path: root/models/upload.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/upload.go')
-rw-r--r--models/upload.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/upload.go b/models/upload.go
index 65b3220c12..c3719368f3 100644
--- a/models/upload.go
+++ b/models/upload.go
@@ -76,8 +76,8 @@ func NewUpload(name string, buf []byte, file multipart.File) (_ *Upload, err err
// GetUploadByUUID returns the Upload by UUID
func GetUploadByUUID(uuid string) (*Upload, error) {
- upload := &Upload{UUID: uuid}
- has, err := x.Get(upload)
+ upload := &Upload{}
+ has, err := x.Where("uuid=?", uuid).Get(upload)
if err != nil {
return nil, err
} else if !has {