mirror of
https://github.com/axllent/mailpit.git
synced 2025-07-03 00:46:58 +02:00
Fix error handling
This commit is contained in:
@ -190,15 +190,15 @@ func DeleteSearch(search, timezone string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = tx.Commit()
|
if err := tx.Commit(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if err := pruneUnusedTags(); err != nil {
|
if err := pruneUnusedTags(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err == nil {
|
|
||||||
logger.Log().Debugf("[db] deleted %d messages matching %s", total, search)
|
logger.Log().Debugf("[db] deleted %d messages matching %s", total, search)
|
||||||
}
|
|
||||||
|
|
||||||
dbLastAction = time.Now()
|
dbLastAction = time.Now()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user