зеркало из https://github.com/golang/build.git
app: fall back to default namespace looking for log entities
Fixes golang/go#9628 Change-Id: Ifc510417775010f2d13b546ae246f45246948234 Reviewed-on: https://go-review.googlesource.com/3505 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Родитель
aef04bd899
Коммит
c9f3a25a6f
|
@ -807,8 +807,17 @@ func logHandler(w http.ResponseWriter, r *http.Request) {
|
|||
key := datastore.NewKey(c, "Log", hash, 0, nil)
|
||||
l := new(Log)
|
||||
if err := datastore.Get(c, key, l); err != nil {
|
||||
logErr(w, r, err)
|
||||
return
|
||||
if err == datastore.ErrNoSuchEntity {
|
||||
// Fall back to default namespace;
|
||||
// maybe this was on the old dashboard.
|
||||
c := appengine.NewContext(r)
|
||||
key := datastore.NewKey(c, "Log", hash, 0, nil)
|
||||
err = datastore.Get(c, key, l)
|
||||
}
|
||||
if err != nil {
|
||||
logErr(w, r, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
b, err := l.Text()
|
||||
if err != nil {
|
||||
|
|
Загрузка…
Ссылка в новой задаче