Actions
Issue #5478
closedRemoving all items from a repo that has no versions raises error
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 59
Quarter:
Description
Steps to reproduce:
http :/pulp/api/v3/repostories/ name=foo
http :/pulp/api/v3/repositories/<uuid>/versions/ remove_content_units:="[\"*\"]"
Error:
{
"_created": "2019-09-18T19:16:23.910811Z",
"_href": "/pulp/api/v3/tasks/8ceebd1c-fb03-42b0-a1bb-8981ad665c68/",
"created_resources": [],
"error": {
"description": "'NoneType' object has no attribute 'content'",
"traceback": " File \"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/worker.py\", line 822, in perform_job\n rv = job.perform()\n File \"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py\", line 605, in perform\n self._result = self._execute()\n File \"/usr/local/lib/pulp/lib64/python3.7/site-packages/rq/job.py\", line 611, in _execute\n return self.func(*self.args, **self.kwargs)\n File \"/home/vagrant/devel/pulpcore/pulpcore/app/tasks/repository.py\", line 92, in add_and_remove\n remove_content_units = latest.content.values_list('pk', flat=True)\n"
},
"finished_at": "2019-09-18T19:16:24.157756Z",
"name": "pulpcore.app.tasks.repository.add_and_remove",
"non_fatal_errors": [],
"parent": null,
"progress_reports": [],
"reserved_resources_record": [
"/pulp/api/v3/repositories/885643cc-49ec-402f-840e-948bd341798c/"
],
"spawned_tasks": [],
"started_at": "2019-09-18T19:16:24.111274Z",
"state": "failed",
"worker": "/pulp/api/v3/workers/6bf34752-51ff-450a-96ca-5aa6c22d4c91/"
}
Updated by daviddavis over 5 years ago
- Description updated (diff)
- Status changed from NEW to POST
- Assignee set to daviddavis
- Tags Katello-P2 added
Added by daviddavis over 5 years ago
Updated by daviddavis over 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|800e70f73caf1f5a12e849887729b4bb0875a2fd.
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Updated by ggainey over 4 years ago
- Tags Katello added
- Tags deleted (
Katello-P2)
Actions
Fix NoneType error when removing content units
fixes #5478 https://pulp.plan.io/issues/5478