Actions
Issue #4358
closedTaskSerializer is broken if created_resources has reference to Content
Status:
CLOSED - NOTABUG
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
Summary:¶
TaskViewSet fails with exception when trying to request task details if a task has reference to a Content model.
File "/var/lib/galaxy/venv/lib64/python3.6/site-packages/pulpcore/app/serializers/repository.py", line 501, in get_content_hrefs
ctype_view = get_view_name_for_model(ctype_model, 'list')
File "/var/lib/galaxy/venv/lib64/python3.6/site-packages/pulpcore/app/util.py", line 66, in get_view_name_for_model
raise LookupError('view not found')
LookupError: view not found
An exception is raised when trying to serialize created_resources field in TaskSerializer.
pulpcore/app/serializers/task.py: 82
created_resources = CreatedResourceSerializer(
help_text=_('Resources created by this task.'),
many=True,
read_only=True,
view_name='None' # This is a polymorphic field. The serializer does not need a view name.
)
Steps to reproduce¶
1. Implement a task that creates a Content model instance.
2. Execute task and get task URL.
3. Request task URL.
Updated by CodeHeeler about 4 years ago
- Priority changed from Normal to Low
- Triaged changed from No to Yes
Updated by jortel@redhat.com about 4 years ago
The Task.created_resources is really not intended for Content related resources but rather things like Publication. Can you help me understand the use case behind this?
Updated by osapryki over 3 years ago
- Status changed from NEW to CLOSED - NOTABUG
Actions