Don't try to delte empty ids

This commit is contained in:
Las Zenow 2014-08-31 17:19:48 -05:00
parent f0ab0cc441
commit deefd5a7f5

View file

@ -21,6 +21,9 @@ func deleteHandler(h handler) {
var isNew bool
ids := strings.Split(mux.Vars(h.r)["ids"], "/")
for _, id := range ids {
if id == "" {
continue
}
book, err := h.db.GetBookId(id)
if err != nil {
h.sess.Notify("Book not found!", "The book with id '"+id+"' is not there", "error")