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

Unified Diff: go/src/infra/gae/libs/gae/helper/datastore_key.go

Issue 1234343006: Some miscellaneous fixes: (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 5 years, 5 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 | go/src/infra/gae/libs/gae/memory/context.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/gae/libs/gae/helper/datastore_key.go
diff --git a/go/src/infra/gae/libs/gae/helper/datastore_key.go b/go/src/infra/gae/libs/gae/helper/datastore_key.go
index 21734e1e7a0c891bf6930dd7e6d3f74adca6e7a9..35d48a56ea625b5822ca3f766db242cfcd63fc12 100644
--- a/go/src/infra/gae/libs/gae/helper/datastore_key.go
+++ b/go/src/infra/gae/libs/gae/helper/datastore_key.go
@@ -116,7 +116,7 @@ func DSKeyUnmarshalJSON(buf []byte) (appID, namespace string, toks []gae.DSKeyTo
// DSKeyIncomplete returns true iff k doesn't have an id yet.
func DSKeyIncomplete(k gae.DSKey) bool {
- return k.StringID() == "" && k.IntID() == 0
+ return k != nil && k.StringID() == "" && k.IntID() == 0
}
// DSKeyValid determines if a key is valid, according to a couple rules:
« no previous file with comments | « no previous file | go/src/infra/gae/libs/gae/memory/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698