Mercurial > gemma
comparison pkg/controllers/system.go @ 854:83c271cb2344
Reverted fcb38cedc680 (More tightened color model.)
The get request did no longer work:
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Fri, 28 Sep 2018 11:47:14 GMT
Content-Length: 65
error: sql: Scan error on column index 3: Unexpected type string
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 28 Sep 2018 13:54:57 +0200 |
parents | fcb38cedc680 |
children | a244b18cb916 |
comparison
equal
deleted
inserted
replaced
852:a3b2626cef49 | 854:83c271cb2344 |
---|---|
109 | 109 |
110 feature := mux.Vars(req)["feature"] | 110 feature := mux.Vars(req)["feature"] |
111 attr := mux.Vars(req)["attr"] | 111 attr := mux.Vars(req)["attr"] |
112 | 112 |
113 c := input.(*models.Colour) | 113 c := input.(*models.Colour) |
114 if !c.IsValid() { | |
115 err = JSONError{http.StatusBadRequest, "error: invalid colours"} | |
116 return | |
117 } | |
114 | 118 |
115 var res sql.Result | 119 var res sql.Result |
116 res, err = db.ExecContext( | 120 res, err = db.ExecContext( |
117 req.Context(), | 121 req.Context(), |
118 setFeatureColourSQL, | 122 setFeatureColourSQL, |