Skip to content

Commit

Permalink
Don't return an error if storagepacker is told to delete no items (#6941
Browse files Browse the repository at this point in the history
)

Just be idempotent -- nothing to delete means nothing to do
  • Loading branch information
jefferai authored Jun 20, 2019
1 parent 0f0027b commit 7c0b290
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helper/storagepacker/storagepacker.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ func (s *StoragePacker) DeleteMultipleItems(ctx context.Context, logger hclog.Lo
var err error
switch len(itemIDs) {
case 0:
return fmt.Errorf("no items IDs given")
// Nothing
return nil

case 1:
logger = hclog.NewNullLogger()
Expand Down

0 comments on commit 7c0b290

Please sign in to comment.