diff --git a/django_project/cplus_api/models/layer.py b/django_project/cplus_api/models/layer.py index 364fd0e..676f81e 100644 --- a/django_project/cplus_api/models/layer.py +++ b/django_project/cplus_api/models/layer.py @@ -7,8 +7,6 @@ from django.conf import settings from django.utils import timezone from django.core.files.storage import storages, FileSystemStorage -from django.db.models.signals import post_save -from django.dispatch import receiver COMMON_LAYERS_DIR = 'common_layers' @@ -211,14 +209,6 @@ def fix_layer_metadata(self): self.save(update_fields=['file']) -@receiver(post_save, sender=InputLayer) -def input_layer_post_save(sender, instance: InputLayer, - created, *args, **kwargs): - from cplus_api.tasks.verify_input_layer import verify_input_layer - if not created: - verify_input_layer.delay(instance.id) - - class OutputLayer(BaseLayer): is_final_output = models.BooleanField( diff --git a/django_project/cplus_api/tests/common.py b/django_project/cplus_api/tests/common.py index f08112a..61e0678 100644 --- a/django_project/cplus_api/tests/common.py +++ b/django_project/cplus_api/tests/common.py @@ -6,7 +6,6 @@ from botocore.exceptions import ClientError from collections import OrderedDict from django.contrib.contenttypes.models import ContentType -from django.db.models.signals import post_save from django.test import TestCase, TransactionTestCase from django.core.files.uploadedfile import SimpleUploadedFile from rest_framework.test import APIRequestFactory @@ -15,8 +14,7 @@ from django.core.files.storage import storages from cplus_api.models.layer import ( InputLayer, - OutputLayer, - input_layer_post_save + OutputLayer ) @@ -123,8 +121,6 @@ def init_test_data(self): ) self.scenario_task_ct = ContentType.objects.get( app_label="cplus_api", model="scenariotask") - # disable input layer post save - post_save.disconnect(input_layer_post_save, sender=InputLayer) def cleanup(self): """Delete storage used in default and minio."""