fix ineffassign

This actually revealed a missing error check. Since we've started a
transaction at this point, I guessed that `s.abortAuto` is what we want
there.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
This commit is contained in:
Stephan Renatus
2018-06-06 10:39:49 +02:00
committed by Torin Sandall
parent 97755b4f33
commit bc0e04851d
+4
View File
@@ -936,6 +936,10 @@ func (s *Server) v1DataDelete(w http.ResponseWriter, r *http.Request) {
}
_, err = s.store.Read(ctx, txn, path)
if err != nil {
s.abortAuto(ctx, txn, w, err)
return
}
if err := s.store.Write(ctx, txn, storage.RemoveOp, path, nil); err != nil {
s.abortAuto(ctx, txn, w, err)