Skip to content

Commit

Permalink
fix: fix put function of storage; issue #840
Browse files Browse the repository at this point in the history
(cherry picked from commit d1e9e9d)
  • Loading branch information
abstractmj authored and DeveloperJim committed Apr 7, 2021
1 parent 2dad238 commit 6f1816f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bcs-services/bcs-storage/storage/actions/lib/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (a *Store) Put(ctx context.Context, resourceType string, data operator.M, o
if len(opt.UpdateTimeKey) != 0 {
data[opt.UpdateTimeKey] = timeNow
}
if err := a.mDriver.Table(resourceType).Upsert(ctx, countCond, operator.M{"$set": data}); err != nil {
if err := a.mDriver.Table(resourceType).Upsert(ctx, opt.Cond, operator.M{"$set": data}); err != nil {
return err
}
return nil
Expand Down

0 comments on commit 6f1816f

Please sign in to comment.