From e6a828572abffabd5ed0a51c15b134c1fe13bba5 Mon Sep 17 00:00:00 2001 From: sourcepirate Date: Thu, 16 Feb 2017 11:07:49 +0530 Subject: [PATCH] Changed method name from create to new --- examples/sanic_peewee.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/sanic_peewee.py b/examples/sanic_peewee.py index ab428ab9..aaa139f1 100644 --- a/examples/sanic_peewee.py +++ b/examples/sanic_peewee.py @@ -1,3 +1,4 @@ + ## You need the following additional packages for this example # aiopg # peewee_async @@ -90,7 +91,7 @@ async def post(request, key, value): """ Save get parameters to database """ - obj = await KeyValue.objects.create(key=key, text=value) + obj = await KeyValue.objects.new(key=key, text=value) return json({'object_id': obj.id})