Skip to content

Commit

Permalink
stores: fix TestS3MultipartUploads
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Mar 4, 2024
1 parent cce9d22 commit 3c7e42f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stores/multipart.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ func (s *SQLStore) MultipartUploadParts(ctx context.Context, bucket, object stri
func (s *SQLStore) AbortMultipartUpload(ctx context.Context, bucket, path string, uploadID string) error {
return s.retryTransaction(func(tx *gorm.DB) error {
// delete multipart upload optimistically
res := tx.Where("upload_id", uploadID).
res := tx.
Where("upload_id", uploadID).
Where("object_id", path).
Where("DBBucket.name", bucket).
Joins("DBBucket").
Where("db_bucket_id = (SELECT id FROM buckets WHERE buckets.name = ?)", bucket).
Delete(&dbMultipartUpload{})
if res.Error != nil {
return fmt.Errorf("failed to fetch multipart upload: %w", res.Error)
Expand Down

0 comments on commit 3c7e42f

Please sign in to comment.