From 68fe3c4287a63adbca30067e702de7fcb31b04e6 Mon Sep 17 00:00:00 2001
From: Harsha Kethineni <harshakethineni@flywheel.io>
Date: Wed, 6 Dec 2017 16:21:18 -0600
Subject: [PATCH] placer.check() call corrected

---
 api/upload.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/api/upload.py b/api/upload.py
index 7bf25f9b..12e051da 100644
--- a/api/upload.py
+++ b/api/upload.py
@@ -84,6 +84,8 @@ def process_upload(request, strategy, container_type=None, id_=None, origin=None
 
     placer_class = strategy.value
     placer = placer_class(container_type, container, id_, metadata, timestamp, origin, context)
+    placer.check()
+
     # Browsers, when sending a multipart upload, will send files with field name "file" (if sinuglar)
     # or "file1", "file2", etc (if multiple). Following this convention is probably a good idea.
     # Here, we accept any
@@ -94,7 +96,6 @@ def process_upload(request, strategy, container_type=None, id_=None, origin=None
     # Ref docs from placer.TargetedPlacer for details.
     if strategy == Strategy.targeted and len(file_fields) > 1:
         raise FileFormException("Targeted uploads can only send one file")
-    placer.check()
 
 
 
-- 
GitLab