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

Unified Diff: service/datastore/properties.go

Issue 1576153003: Encode nil datastore keys as PTNull. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Created 4 years, 11 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/properties_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/properties.go
diff --git a/service/datastore/properties.go b/service/datastore/properties.go
index f266362cd6bd31bc06245eb175eecda42c1c829d..e8c1813496122a0c7368038245f80931dfe2835f 100644
--- a/service/datastore/properties.go
+++ b/service/datastore/properties.go
@@ -324,6 +324,13 @@ func UpconvertUnderlyingType(o interface{}) interface{} {
}
}
}
+
+ switch t {
+ case typeOfKey:
+ if v.IsNil() {
+ return nil
+ }
+ }
return o
}
« no previous file with comments | « no previous file | service/datastore/properties_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698