From c796f2b2c42a0bf2f58b9b0537f8aab0dcf5f153 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 26 Sep 2015 23:50:57 -0400 Subject: [PATCH] TODO comment cleanups. Remove unused Document model method. --- mayan/apps/common/generics.py | 2 -- mayan/apps/common/mixins.py | 1 - mayan/apps/documents/models.py | 7 ------- 3 files changed, 10 deletions(-) diff --git a/mayan/apps/common/generics.py b/mayan/apps/common/generics.py index b6b1b545eb..6b5839fe8a 100644 --- a/mayan/apps/common/generics.py +++ b/mayan/apps/common/generics.py @@ -348,8 +348,6 @@ class SingleObjectDetailView(ViewPermissionCheckMixin, ObjectPermissionCheckMixi return context -# TODO: check/test if ViewPermissionCheckMixin, ObjectPermissionCheckMixin are -# in the right MRO class SingleObjectEditView(ViewPermissionCheckMixin, ObjectPermissionCheckMixin, ExtraContextMixin, RedirectionMixin, UpdateView): template_name = 'appearance/generic_form.html' diff --git a/mayan/apps/common/mixins.py b/mayan/apps/common/mixins.py index f70e0a52c4..0555427707 100644 --- a/mayan/apps/common/mixins.py +++ b/mayan/apps/common/mixins.py @@ -107,7 +107,6 @@ class ObjectPermissionCheckMixin(object): return self.get_object() def dispatch(self, request, *args, **kwargs): - if self.object_permission: try: Permission.check_permissions( diff --git a/mayan/apps/documents/models.py b/mayan/apps/documents/models.py index c207c36953..95c741b75c 100644 --- a/mayan/apps/documents/models.py +++ b/mayan/apps/documents/models.py @@ -271,13 +271,6 @@ class Document(models.Model): def date_updated(self): return self.latest_version.timestamp - # TODO: look to remove, only used by the OCR parser - def document_save_to_temp_dir(self, filename, buffer_size=1024 * 1024): - temporary_path = os.path.join( - setting_temporary_directory.value, filename - ) - return self.save_to_file(temporary_path, buffer_size) - # TODO: rename to file_encoding @property def file_mime_encoding(self):