Actions
Issue #5543
closedGet a KeyError when using the `fields` parameter
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 60
Quarter:
Description
I'm seeing this in different plugins so filing against core.
Steps to reproduce:
1. Create a file repo and sync it
2. Call http :/pulp/api/v3/content/file/files/?fields=md5
Error:
[04/Oct/2019 20:11:31] "GET /pulp/api/v3/content/file/files/ HTTP/1.0" 200 2234
pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/content/file/files/
Traceback (most recent call last):
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/viewsets.py", line 114, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 497, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 457, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 468, in raise_uncaught_exception
raise exc
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/views.py", line 494, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/mixins.py", line 42, in list
serializer = self.get_serializer(page, many=True)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/generics.py", line 110, in get_serializer
return serializer_class(*args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 123, in __new__
return cls.many_init(*args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/serializers.py", line 144, in many_init
child_serializer = cls(*args, **kwargs)
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/pulpcore/plugin/serializers/content.py", line 49, in __init__
self.fields["artifact"].required = False
File "/usr/local/lib/pulp/lib64/python3.7/site-packages/rest_framework/utils/serializer_helpers.py", line 148, in __getitem__
return self.fields[key]
KeyError: 'artifact'
[04/Oct/2019 20:11:46] "GET /pulp/api/v3/content/file/files/?fields=md5 HTTP/1.0" 500 27
Updated by fao89 about 5 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 60
Updated by fao89 about 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to fao89
Updated by fao89 about 5 years ago
- Status changed from ASSIGNED to POST
Updated by Anonymous about 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset commit:pulpcore-plugin|e05e931164e01caf66616bded5d48e22224c52c6.
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions