Skip to content

Commit

Permalink
hot-fix: desconecta signal pre_save no migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
LeandroJatai committed Jun 19, 2023
1 parent 23adf66 commit 55c0363
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sapl/base/receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from django.core.files.uploadedfile import InMemoryUploadedFile, UploadedFile
from django.db.models.fields.files import FileField
from django.db.models.signals import post_delete, post_save, \
post_migrate, pre_save
post_migrate, pre_save, pre_migrate
from django.db.utils import DEFAULT_DB_ALIAS
from django.dispatch import receiver
from django.utils import timezone
Expand Down Expand Up @@ -465,3 +465,8 @@ def filefield_from_model(m):
def signed_files_extraction_pre_save_signal(sender, instance, **kwargs):

signed_files_extraction_function(sender, instance, **kwargs)


@receiver(pre_migrate, dispatch_uid='disconnect_signals_pre_migrate')
def disconnect_signals_pre_migrate(*args, **kwargs):
pre_save.disconnect(dispatch_uid='signed_files_extraction_pre_save_signal')

0 comments on commit 55c0363

Please sign in to comment.