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