Remove transformation manager methods
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -165,7 +165,7 @@ class DocumentPage(models.Model):
|
||||
transformation_list = []
|
||||
|
||||
# Stored transformations first
|
||||
for stored_transformation in Transformation.objects.get_for_model(self, as_classes=True):
|
||||
for stored_transformation in Transformation.objects.get_for_object(self, as_classes=True):
|
||||
transformation_list.append(stored_transformation)
|
||||
|
||||
# Interactive transformations second
|
||||
|
||||
@@ -143,7 +143,7 @@ class DocumentVersion(models.Model):
|
||||
for page in self.pages.all():
|
||||
degrees = page.detect_orientation()
|
||||
if degrees:
|
||||
Transformation.objects.add_for_model(
|
||||
Transformation.objects.add_to_object(
|
||||
obj=page, transformation=TransformationRotate,
|
||||
arguments='{{"degrees": {}}}'.format(360 - degrees)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user