Add rm command to delete results
This commit is contained in:
parent
e6a67ca5aa
commit
47a2fbb88c
4 changed files with 61 additions and 0 deletions
|
|
@ -122,6 +122,9 @@ func DeleteResult(sess sqlbuilder.Database, resultID int64) error {
|
|||
var result Result
|
||||
res := sess.Collection("results").Find("result_id", resultID)
|
||||
if err := res.One(&result); err != nil {
|
||||
if err == db.ErrNoMoreRows {
|
||||
return err
|
||||
}
|
||||
log.WithError(err).Error("error in obtaining the result")
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue