Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fixed validation of the distributor missing resources in the migratio…
Browse files Browse the repository at this point in the history
…n plan.

closes #7488
https://pulp.plan.io/issues/7488
  • Loading branch information
ipanova committed Sep 21, 2020
1 parent 8190980 commit 4a9855e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/7488.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed validation of the distributor missing resources in the migration plan.
4 changes: 2 additions & 2 deletions pulp_2to3_migration/app/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def _check_missing(self):
self.missing_repositories = list(expected - present)

distributors = Distributor.objects(
distributor_id__in=self.all_repositories_distributors_to_migrate).only('distributor_id')
present = set(distributor.distributor_id for distributor in distributors)
repo_id__in=self.all_repositories_distributors_to_migrate).only('repo_id')
present = set(distributor.repo_id for distributor in distributors)
expected = set(self.all_repositories_distributors_to_migrate)

self.repositories_missing_distributors = list(expected - present)
Expand Down

0 comments on commit 4a9855e

Please sign in to comment.