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

Unified Diff: impl/prod/datastore_key.go

Issue 1289323002: Fix miscellaneous prod bugs. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Created 5 years, 4 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 | impl/prod/info.go » ('j') | impl/prod/info.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/datastore_key.go
diff --git a/impl/prod/datastore_key.go b/impl/prod/datastore_key.go
index fde1c970f405b0dbb3e5eba12576089aceb55c5a..23d8fe814c84fb4b6273dc869b33dc406325f9c1 100644
--- a/impl/prod/datastore_key.go
+++ b/impl/prod/datastore_key.go
@@ -19,11 +19,17 @@ func (k dsKeyImpl) Parent() ds.Key { return dsR2F(k.Key.Parent()) }
// dsR2F (DS real-to-fake) converts an SDK Key to a ds.Key
func dsR2F(k *datastore.Key) ds.Key {
+ if k == nil {
+ return nil
+ }
return dsKeyImpl{k}
}
// dsF2R (DS fake-to-real) converts a DSKey back to an SDK *Key.
func dsF2R(k ds.Key) *datastore.Key {
+ if k == nil {
+ return nil
+ }
if rkey, ok := k.(dsKeyImpl); ok {
return rkey.Key
}
« no previous file with comments | « no previous file | impl/prod/info.go » ('j') | impl/prod/info.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698