fix pdf ratio
This commit is contained in:
parent
563bbd5b0e
commit
f4779195a2
1 changed files with 1 additions and 1 deletions
|
@ -244,7 +244,7 @@ class Document(models.Model):
|
||||||
|
|
||||||
def get_ratio(self):
|
def get_ratio(self):
|
||||||
if self.extension == 'pdf':
|
if self.extension == 'pdf':
|
||||||
image = self.thumbnail()
|
image = self.thumbnail(1024)
|
||||||
try:
|
try:
|
||||||
size = Image.open(image).size
|
size = Image.open(image).size
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in a new issue