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

Unified Diff: service/datastore/context.go

Issue 1916463004: impl/memory: Disallow empty namespace. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Rbase. Created 4 years, 8 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 | « service/datastore/checkfilter.go ('k') | service/datastore/context_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/context.go
diff --git a/service/datastore/context.go b/service/datastore/context.go
index 165e3b0881bf5a69aaa7d08e624e9e24aaca5546..1fe5f8dddfe2a52c83f2968eac53ef61568ace08 100644
--- a/service/datastore/context.go
+++ b/service/datastore/context.go
@@ -64,10 +64,11 @@ func GetRawNoTxn(c context.Context) RawInterface {
// Get gets the Interface implementation from context.
func Get(c context.Context) Interface {
inf := info.Get(c)
+ ns, _ := inf.GetNamespace()
return &datastoreImpl{
GetRaw(c),
inf.FullyQualifiedAppID(),
- inf.GetNamespace(),
+ ns,
}
}
@@ -77,10 +78,11 @@ func Get(c context.Context) Interface {
// Get gets the Interface implementation from context.
func GetNoTxn(c context.Context) Interface {
inf := info.Get(c)
+ ns, _ := inf.GetNamespace()
return &datastoreImpl{
GetRawNoTxn(c),
inf.FullyQualifiedAppID(),
- inf.GetNamespace(),
+ ns,
}
}
« no previous file with comments | « service/datastore/checkfilter.go ('k') | service/datastore/context_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698