From 4ea1a208eb882c424a3ff215fffa8436f7d3c450 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 23 Nov 2019 12:58:54 -0400 Subject: [PATCH] Remove TODO remarks Converted to entries in the ticket system. Signed-off-by: Roberto Rosario --- mayan/apps/acls/classes.py | 2 -- mayan/apps/acls/models.py | 1 - mayan/apps/common/forms.py | 1 - mayan/apps/django_gpg/runtime.py | 1 - mayan/apps/document_indexing/literals.py | 2 +- mayan/apps/document_states/api_views.py | 1 - mayan/apps/documents/models/document_models.py | 1 - mayan/apps/documents/views/document_views.py | 1 - mayan/apps/sources/views.py | 1 - mayan/apps/tags/tests/test_api.py | 1 - mayan/apps/user_management/tests/test_events.py | 8 -------- 11 files changed, 1 insertion(+), 19 deletions(-) diff --git a/mayan/apps/acls/classes.py b/mayan/apps/acls/classes.py index ff68ae1386..17484c3178 100644 --- a/mayan/apps/acls/classes.py +++ b/mayan/apps/acls/classes.py @@ -18,8 +18,6 @@ class ModelPermission(object): @classmethod def deregister(cls, model): cls._registry.pop(model, None) - # TODO: Find method to revert the add_to_class('acls'...) - # delattr doesn't work. @classmethod def get_classes(cls, as_content_type=False): diff --git a/mayan/apps/acls/models.py b/mayan/apps/acls/models.py index 82cc2896e5..beb233ef05 100644 --- a/mayan/apps/acls/models.py +++ b/mayan/apps/acls/models.py @@ -39,7 +39,6 @@ class AccessControlList(models.Model): content_object = GenericForeignKey( ct_field='content_type', fk_field='object_id', ) - # TODO: limit choices to the permissions valid for the content_object permissions = models.ManyToManyField( blank=True, related_name='acls', to=StoredPermission, verbose_name=_('Permissions') diff --git a/mayan/apps/common/forms.py b/mayan/apps/common/forms.py index 9a82560efb..99e530152c 100644 --- a/mayan/apps/common/forms.py +++ b/mayan/apps/common/forms.py @@ -124,7 +124,6 @@ class DetailForm(forms.ModelForm): field_object, 'help_text', None ) - # TODO: Add others result types <=> Field types if isinstance(result, models.query.QuerySet): self.fields[field] = forms.ModelMultipleChoiceField( queryset=result, label=label diff --git a/mayan/apps/django_gpg/runtime.py b/mayan/apps/django_gpg/runtime.py index 250373f711..68d042d803 100644 --- a/mayan/apps/django_gpg/runtime.py +++ b/mayan/apps/django_gpg/runtime.py @@ -2,7 +2,6 @@ from django.utils.module_loading import import_string from .settings import setting_gpg_path -# TODO: This will become an setting option in 2.2 SETTING_GPG_BACKEND = 'mayan.apps.django_gpg.classes.PythonGNUPGBackend' gpg_backend = import_string(SETTING_GPG_BACKEND)( diff --git a/mayan/apps/document_indexing/literals.py b/mayan/apps/document_indexing/literals.py index b170d49de7..4e42851d42 100644 --- a/mayan/apps/document_indexing/literals.py +++ b/mayan/apps/document_indexing/literals.py @@ -1 +1 @@ -RETRY_DELAY = 5 # TODO: convert this into a config option +RETRY_DELAY = 5 diff --git a/mayan/apps/document_states/api_views.py b/mayan/apps/document_states/api_views.py index 3b162c710f..e96742a0f2 100644 --- a/mayan/apps/document_states/api_views.py +++ b/mayan/apps/document_states/api_views.py @@ -518,7 +518,6 @@ class APIWorkflowInstanceLogEntryListView(generics.ListCreateAPIView): Failing that, check for ACLs for any of the workflow's transitions. Failing that, then raise PermissionDenied """ - # TODO: Improvement above AccessControlList.objects.check_access( obj=document, permissions=(permission_workflow_view,), user=self.request.user diff --git a/mayan/apps/documents/models/document_models.py b/mayan/apps/documents/models/document_models.py index a2dcdd2bf2..197850478d 100644 --- a/mayan/apps/documents/models/document_models.py +++ b/mayan/apps/documents/models/document_models.py @@ -69,7 +69,6 @@ class Document(models.Model): 'Whether or not this document is in the trash.' ), editable=False, verbose_name=_('In trash?') ) - # TODO: set editable to False deleted_date_time = models.DateTimeField( blank=True, editable=True, help_text=_( 'The server date and time when the document was moved to the ' diff --git a/mayan/apps/documents/views/document_views.py b/mayan/apps/documents/views/document_views.py index 8745ee5d50..4e69f6edf9 100644 --- a/mayan/apps/documents/views/document_views.py +++ b/mayan/apps/documents/views/document_views.py @@ -254,7 +254,6 @@ class DocumentDownloadView(SingleObjectDownloadView): target=item ) else: - # TODO: Improve by adding a document version download event event_document_download.commit( actor=request.user, target=item.document diff --git a/mayan/apps/sources/views.py b/mayan/apps/sources/views.py index bd12b08add..02b33ae932 100644 --- a/mayan/apps/sources/views.py +++ b/mayan/apps/sources/views.py @@ -383,7 +383,6 @@ class DocumentVersionUploadInteractiveView(UploadBaseView): klass=Document, pk=kwargs['document_pk'] ) - # TODO: Try to remove this new version block check from here if NewVersionBlock.objects.is_blocked(self.document): messages.error( message=_( diff --git a/mayan/apps/tags/tests/test_api.py b/mayan/apps/tags/tests/test_api.py index 069f480006..05c7d75827 100644 --- a/mayan/apps/tags/tests/test_api.py +++ b/mayan/apps/tags/tests/test_api.py @@ -201,7 +201,6 @@ class TagDocumentAPIViewTestCase( response = self._request_test_document_attach_tag_api_view() self.assertEqual(response.status_code, status.HTTP_201_CREATED) - # TODO: This should be false. Update API View. self.assertTrue(self.test_tag in self.test_document.tags.all()) def test_document_attach_tag_view_with_full_access(self): diff --git a/mayan/apps/user_management/tests/test_events.py b/mayan/apps/user_management/tests/test_events.py index d33b1fa675..97ffc26a5e 100644 --- a/mayan/apps/user_management/tests/test_events.py +++ b/mayan/apps/user_management/tests/test_events.py @@ -70,8 +70,6 @@ class GroupEventsAPITestCase( action = Action.objects.last() - # TODO: Future improvement, find method to record the user who - # commited the event. Will required custom serializer .create method self.assertEqual(action.actor, self.test_group) self.assertEqual(action.target, self.test_group) self.assertEqual(action.verb, event_group_created.id) @@ -89,8 +87,6 @@ class GroupEventsAPITestCase( action = Action.objects.last() - # TODO: Future improvement, find method to record the user who - # commited the event. Will required custom serializer .update method self.assertEqual(action.actor, self.test_group) self.assertEqual(action.target, self.test_group) self.assertEqual(action.verb, event_group_edited.id) @@ -185,8 +181,6 @@ class UserEventsAPITestCase( action = Action.objects.last() - # TODO: Future improvement, find method to record the user who - # commited the event. Will required custom serializer .create method self.assertEqual(action.actor, self.test_user) self.assertEqual(action.target, self.test_user) self.assertEqual(action.verb, event_user_created.id) @@ -203,8 +197,6 @@ class UserEventsAPITestCase( action = Action.objects.last() - # TODO: Future improvement, find method to record the user who - # commited the event. Will required custom serializer .update method self.assertEqual(action.actor, self.test_user) self.assertEqual(action.target, self.test_user) self.assertEqual(action.verb, event_user_edited.id)