summaryrefslogtreecommitdiff
path: root/matweb
diff options
context:
space:
mode:
authorJan Friedli2020-07-14 22:49:24 +0200
committerJan Friedli2020-07-14 22:49:24 +0200
commit2ba8d74fa7e104ddfaac365c1efe1bb99c632ed3 (patch)
tree729829e623860ade3895f62ba5b938e880461a18 /matweb
parent5d1e6b3235f9cddf66611e7cf4f4d0b41ffd7368 (diff)
catch no bulk post body
Diffstat (limited to '')
-rw-r--r--matweb/rest_api.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/matweb/rest_api.py b/matweb/rest_api.py
index 429b82e..2909cf6 100644
--- a/matweb/rest_api.py
+++ b/matweb/rest_api.py
@@ -106,6 +106,8 @@ class APIBulkDownloadCreator(Resource):
106 def post(self): 106 def post(self):
107 utils.check_upload_folder(current_app.config['UPLOAD_FOLDER']) 107 utils.check_upload_folder(current_app.config['UPLOAD_FOLDER'])
108 data = request.json 108 data = request.json
109 if not data:
110 abort(400, message="Post Body Required")
109 if not self.v.validate(data): 111 if not self.v.validate(data):
110 abort(400, message=self.v.errors) 112 abort(400, message=self.v.errors)
111 # prevent the zip file from being overwritten 113 # prevent the zip file from being overwritten