diff options
Diffstat (limited to 'services/attachment/attachment.go')
-rw-r--r-- | services/attachment/attachment.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/attachment/attachment.go b/services/attachment/attachment.go index 06f79be01b..7500a8ac3a 100644 --- a/services/attachment/attachment.go +++ b/services/attachment/attachment.go @@ -6,6 +6,7 @@ package attachment import ( "bytes" + "context" "fmt" "io" @@ -23,7 +24,7 @@ func NewAttachment(attach *models.Attachment, file io.Reader) (*models.Attachmen return nil, fmt.Errorf("attachment %s should belong to a repository", attach.Name) } - err := db.WithTx(func(ctx *db.Context) error { + err := db.WithTx(func(ctx context.Context) error { attach.UUID = uuid.New().String() size, err := storage.Attachments.Save(attach.RelativePath(), file, -1) if err != nil { |