]> git.parisson.com Git - teleforma.git/commitdiff
just check mime type
authorGuillaume Pellerin <yomguy@parisson.com>
Sun, 3 Aug 2014 23:13:09 +0000 (01:13 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Sun, 3 Aug 2014 23:13:09 +0000 (01:13 +0200)
teleforma/exam/models.py

index 197ffdff8cd055346b991992932eccd1eae3bdf0..8bcb25b1ee36e4e5616bfe5724520af495fc43d1 100644 (file)
@@ -362,7 +362,7 @@ class Script(BaseResource):
             return
 
         mime_type = mimetype_file(self.file.path)
-        if not ('.pdf' in self.file.path or '.PDF' in self.file.path or 'pdf' in mime_type):
+        if not 'pdf' in mime_type:
             self.auto_reject('wrong format')
             return