1
0
mirror of https://github.com/golang/go synced 2024-11-25 08:47:56 -07:00

dashboard: fix todo caching nil

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5504082
This commit is contained in:
Andrew Gerrand 2011-12-23 16:04:01 +11:00
parent 5a65cbacd3
commit e6a322b0b9

View File

@ -152,11 +152,10 @@ func todoHandler(r *http.Request) (interface{}, os.Error) {
c := appengine.NewContext(r)
now := cache.Now(c)
key := "build-todo-" + r.Form.Encode()
cachedTodo := new(Todo)
if cache.Get(r, now, key, cachedTodo) {
return cachedTodo, nil
}
var todo *Todo
if cache.Get(r, now, key, &todo) {
return todo, nil
}
var err os.Error
builder := r.FormValue("builder")
for _, kind := range r.Form["kind"] {