Changed method name from create to new
This commit is contained in:
parent
6ea43d8e6d
commit
e6a828572a
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
## You need the following additional packages for this example
|
## You need the following additional packages for this example
|
||||||
# aiopg
|
# aiopg
|
||||||
# peewee_async
|
# peewee_async
|
||||||
|
@ -90,7 +91,7 @@ async def post(request, key, value):
|
||||||
"""
|
"""
|
||||||
Save get parameters to database
|
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})
|
return json({'object_id': obj.id})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user