Skip to content

Commit

Permalink
Fix the use of content_artifact_set in handler
Browse files Browse the repository at this point in the history
```
File "/usr/local/lib/python3.8/site-packages/pulpcore/content/handler.py", line 847, in _save_artifact
  cas = list(content.contentartifact_set().select_related("artifact"))
TypeError: __call__() missing 1 required keyword-only argument: 'manager'
```

fixes pulp#3945
  • Loading branch information
mdellweg committed Jun 21, 2023
1 parent 30bfe11 commit e5f3598
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/3945.bugfix
@@ -0,0 +1 @@
Fixed error when downloading pull-through content that already exists in Pulp.
2 changes: 1 addition & 1 deletion pulpcore/content/handler.py
Expand Up @@ -844,7 +844,7 @@ def _save_artifact(self, download_result, remote_artifact, request=None):
# There is already content saved
content = c_type.objects.get(content.q())
created_artifact_digests = {rp: a.sha256 for rp, a in artifacts.items() if a}
cas = list(content.contentartifact_set().select_related("artifact"))
cas = list(content.contentartifact_set.select_related("artifact"))
found_artifact_digests = {
ca.relative_path: ca.artifact.sha256 for ca in cas if ca.artifact
}
Expand Down

0 comments on commit e5f3598

Please sign in to comment.