fix pdf ratio

This commit is contained in:
j 2014-11-01 15:42:16 +02:00
parent 563bbd5b0e
commit f4779195a2

View file

@ -244,7 +244,7 @@ class Document(models.Model):
def get_ratio(self):
if self.extension == 'pdf':
image = self.thumbnail()
image = self.thumbnail(1024)
try:
size = Image.open(image).size
except: