From d1cbb124997166292eed2f7cfb25c82d82792226 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 28 Mar 2015 09:55:16 +0100 Subject: It is now possible to delete all duplicate articles with one request. --- pyaggr3g470r/views/api/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pyaggr3g470r/views') diff --git a/pyaggr3g470r/views/api/common.py b/pyaggr3g470r/views/api/common.py index b1b0cd73..424df960 100644 --- a/pyaggr3g470r/views/api/common.py +++ b/pyaggr3g470r/views/api/common.py @@ -205,7 +205,8 @@ class PyAggResourceMulti(PyAggAbstractResource): def delete(self): """will delete several objects, a list of their ids should be in the payload""" - if 'application/json' != request.headers.get('Content-Type'): + if 'application/json' not in request.headers.get('Content-Type'): + print(request.headers.get('Content-Type')) raise BadRequest("Content-Type must be application/json") status = 204 results = [] -- cgit