diff --git a/CHANGES/1986.bugfix b/CHANGES/1986.bugfix new file mode 100644 index 000000000..a328a78ef --- /dev/null +++ b/CHANGES/1986.bugfix @@ -0,0 +1 @@ +Set `is_highest` to `False` before importing a collection version to prevent conflicts. diff --git a/pulp_ansible/app/modelresource.py b/pulp_ansible/app/modelresource.py index 06fd51319..751692308 100644 --- a/pulp_ansible/app/modelresource.py +++ b/pulp_ansible/app/modelresource.py @@ -115,6 +115,9 @@ def before_import_row(self, row, **kwargs): col = Collection.objects.get(name=row["name"], namespace=row["namespace"]) row["collection"] = str(col.pk) + # This field easily produces constraints violations. + # But it's neither useful nor correct. It's removed in newer versions anyway. + row["is_highest"] = False def set_up_queryset(self): """