瀏覽代碼

don't allow incomplete data when uploading videos

David 9 年之前
父節點
當前提交
4ac014b050
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      back/web.py

+ 2 - 0
back/web.py

@@ -89,6 +89,8 @@ def upload():
     prof=data["prof"]
     texto1=data["texto1"]
     texto2=data["texto2"]
+    if video is None or prof is None or texto1 is None or texto2 is None:
+        return jsonify({"status":"Error, faltan datos"})
     tasks.upload_video(video,prof,texto1,texto2)
     return jsonify(ret)