Skip to content
Snippets Groups Projects
Commit 92204532 authored by Andreas Valder's avatar Andreas Valder
Browse files

is_json was added in 0.11 -.- using get_json and testing for none

parent 585df417
Branches
No related tags found
No related merge requests found
......@@ -390,7 +390,7 @@ def edit(prefix='', ignore=[]):
prefix = request.args['prefix']
modify('BEGIN')
changes = request.values.items()
if (request.method == 'POST') and (request.is_json):
if (request.method == 'POST') and (request.get_json()):
changes = request.get_json().items()
for key, val in changes:
if key in ignore:
......@@ -419,7 +419,7 @@ def create(table):
columns.append(column)
values.append(val)
args = request.values
if (request.method == 'POST') and (request.is_json):
if (request.method == 'POST') and (request.get_json()):
args = request.get_json()
for column, val in args.items():
if column == 'ref':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment