Fix document orientaton detection

GitLab issue #713. Thanks to Rob de Canha-Knight (@rssfed23)
for the report and debug information.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-12-15 23:06:35 -04:00
parent 9a4f3f0332
commit 6c828eaf94
5 changed files with 52 additions and 50 deletions

View File

@@ -156,8 +156,8 @@ class DocumentVersion(models.Model):
for page in self.pages.all():
degrees = page.detect_orientation()
if degrees:
layer_saved_transformations.add_to_object(
obj=page, transformation=TransformationRotate,
layer_saved_transformations.add_transformation_to(
obj=page, transformation_class=TransformationRotate,
arguments='{{"degrees": {}}}'.format(360 - degrees)
)