diff --git a/CHANGES/pulp_file/8141.bugfix b/CHANGES/pulp_file/8141.bugfix new file mode 100644 index 00000000000..8430ee541ce --- /dev/null +++ b/CHANGES/pulp_file/8141.bugfix @@ -0,0 +1 @@ +Fixed `optimize` in file sync to honor the value `False`. diff --git a/pulp_file/app/settings.py b/pulp_file/app/settings.py index 93ef8b1b944..8b137891791 100644 --- a/pulp_file/app/settings.py +++ b/pulp_file/app/settings.py @@ -1 +1 @@ -FILE_SYNC_OPTIMIZATION = True + diff --git a/pulp_file/app/tasks/synchronizing.py b/pulp_file/app/tasks/synchronizing.py index 36cab3aff73..8c89f749a82 100644 --- a/pulp_file/app/tasks/synchronizing.py +++ b/pulp_file/app/tasks/synchronizing.py @@ -7,7 +7,6 @@ from hashlib import sha256 from urllib.parse import quote, urlparse, urlunparse -from django.conf import settings from django.core.files import File from pulpcore.plugin.exceptions import SyncError @@ -113,8 +112,6 @@ def synchronize(remote_pk, repository_pk, mirror, optimize=False, url=None, **kw remote = Remote.objects.get(pk=remote_pk).cast() repository = FileRepository.objects.get(pk=repository_pk) - optimize = optimize or settings.FILE_SYNC_OPTIMIZATION - if not remote.url: raise SyncError(_("A remote must have a url specified to synchronize."))