Check for error here is not needed.
This commit is contained in:
parent
67c6902217
commit
a35b1a336b
@ -280,10 +280,6 @@ func (h *MindflowApiHandlers) Edit(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
if r.FormValue("category") != "" {
|
if r.FormValue("category") != "" {
|
||||||
category.ID, _ = strconv.ParseInt(r.FormValue("category"), 10, 64)
|
category.ID, _ = strconv.ParseInt(r.FormValue("category"), 10, 64)
|
||||||
if err != nil {
|
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if category.ID == 0 {
|
if category.ID == 0 {
|
||||||
category.ID, err = h.db.NewCategory(r.FormValue("new-category"))
|
category.ID, err = h.db.NewCategory(r.FormValue("new-category"))
|
||||||
|
Loading…
Reference in New Issue
Block a user