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:
@@ -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)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user