Don't try to delte empty ids
This commit is contained in:
parent
f0ab0cc441
commit
deefd5a7f5
1 changed files with 3 additions and 0 deletions
3
admin.go
3
admin.go
|
@ -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")
|
||||
|
|
Reference in a new issue