Skip to content

Commit

Permalink
Revise.
Browse files Browse the repository at this point in the history
fixes: pulp#1391

Signed-off-by: James Tanner <tanner.jc@gmail.com>
  • Loading branch information
jctanner committed Mar 20, 2023
1 parent 5c6a6ec commit c4b6787
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pulp_ansible/app/tasks/collections.py
Expand Up @@ -443,7 +443,8 @@ def is_new_highest(new, old):
# we only have one version, so mark it as the highest
if collection_version.collection.versions.count() == 1:
collection_version.is_highest = True
collection_version.save()
if save:
collection_version.save()
return

# compute highest from the whole list ...
Expand All @@ -454,7 +455,8 @@ def is_new_highest(new, old):
highest = (sv, cv)

highest[1].is_highest = True
highest[1].save()
if save:
highest[1].save()
return

# exit if the new CV is not higher
Expand Down

0 comments on commit c4b6787

Please sign in to comment.