From 3e9b82c5381b9e9f09dc1fc09903757be5eb377a Mon Sep 17 00:00:00 2001 From: "Jiahao.Liang" Date: Fri, 26 Feb 2016 17:16:33 -0800 Subject: [PATCH] Change id type to make it consistent According to dict BOOKS, id should be a string instead an int. --- docs/source/rest.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/rest.rst b/docs/source/rest.rst index 6f6a01b..1f74343 100644 --- a/docs/source/rest.rst +++ b/docs/source/rest.rst @@ -64,7 +64,7 @@ in pecan): # HTTP POST / @index.when(method='POST', template='json') def index_POST(self, **kw): - id_ = len(BOOKS) + id_ = str(len(BOOKS)) BOOKS[id_] = kw['name'] return dict(id=id_, name=kw['name'])