From: Guillaume Pellerin Date: Sat, 19 Jul 2014 18:27:43 +0000 (+0200) Subject: fix import X-Git-Tag: 1.1~385 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c61d9c07152612d4d07511068843032604887e1d;p=teleforma.git fix import --- diff --git a/teleforma/exam/models.py b/teleforma/exam/models.py index 03bd5d20..b40e22e4 100644 --- a/teleforma/exam/models.py +++ b/teleforma/exam/models.py @@ -308,7 +308,7 @@ class Script(BaseResource): # self.url = 'http://teleforma.parisson.com/media/scripts/2014/06/24/Gstreamer_monitoring_Pipleline.pdf' self.url = settings.MEDIA_URL + unicode(self.file) - if not '.pdf' in self.file.path or not '.PDF' in self.file.path: + if not ('.pdf' in self.file.path or '.PDF' in self.file.path): self.reject_reason = 'wrong format' self.status = 0 self.corrector = User.objects.filter(is_superuser=True)[0]