From 994096135e378527a09f41d86aea5fc0d8139f74 Mon Sep 17 00:00:00 2001 From: Grant Gainey Date: Wed, 2 Nov 2022 10:31:56 -0400 Subject: [PATCH] Fixed filter-call in overlapping-content-case. fixes #593. --- CHANGES/593.bugfix | 1 + pulp_2to3_migration/app/migration.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 CHANGES/593.bugfix diff --git a/CHANGES/593.bugfix b/CHANGES/593.bugfix new file mode 100644 index 00000000..0c29ad93 --- /dev/null +++ b/CHANGES/593.bugfix @@ -0,0 +1 @@ +Fixed failure when encountering overlapping content. diff --git a/pulp_2to3_migration/app/migration.py b/pulp_2to3_migration/app/migration.py index 3df94bb6..02b7a356 100644 --- a/pulp_2to3_migration/app/migration.py +++ b/pulp_2to3_migration/app/migration.py @@ -422,9 +422,7 @@ def resolve_path_overlap(version): else: # It's not a duplicated path but it overlaps with some other in the version, # it should be removed from the version to resolve the conflict. - version.remove_content( - Content.objects.filter(pk__in=cas_with_conflicts[0].content.pk) - ) + version.remove_content(Content.objects.filter(pk=cas_with_conflicts[0].content.pk)) _logger.info( _( "Overlapping paths have been found in Pulp 3 repo `{repo}`: Removed "