Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1781)

Unified Diff: service/datastore/pls_impl.go

Issue 1425283002: service/datastore: Call MGS GetAllMeta() in Save() (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Add support/handling for invalid codec. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | service/datastore/pls_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/pls_impl.go
diff --git a/service/datastore/pls_impl.go b/service/datastore/pls_impl.go
index 0900f9106c51f032a5a15a2953e9953262f17d27..b5e945ccfb5224e545889feca88084247123f8a5 100644
--- a/service/datastore/pls_impl.go
+++ b/service/datastore/pls_impl.go
@@ -205,9 +205,13 @@ func loadInner(codec *structCodec, structValue reflect.Value, index int, name st
}
func (p *structPLS) Save(withMeta bool) (PropertyMap, error) {
+ if err := p.Problem(); err != nil {
+ return nil, err
+ }
+
ret := PropertyMap(nil)
if withMeta {
- ret = p.GetAllMeta()
+ ret = getMGS(p.o.Addr().Interface()).GetAllMeta()
} else {
ret = make(PropertyMap, len(p.c.byName))
}
« no previous file with comments | « no previous file | service/datastore/pls_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698