Project

Profile

Help

Issue #8276

closed

0.7.0 V3 collection list endpoint errors when repository is empty

Added by bmbouter almost 4 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

  1. Create a repository and distribution
  2. Try to GET the collection list endpoint, e.g. /pulp_ansible/galaxy/foo/api/v3/collections/
pulp [d8f15dfe9e274d98a60bcdac824eb502]: django.request:ERROR: Internal Server Error: /pulp_ansible/galaxy/foo/api/v3/collections/
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/viewsets.py", line 125, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.6/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/mixins.py", line 42, in list
    serializer = self.get_serializer(page, many=True)
  File "/usr/local/lib/python3.6/site-packages/rest_framework/generics.py", line 109, in get_serializer
    kwargs.setdefault('context', self.get_serializer_context())
  File "/usr/local/lib/python3.6/site-packages/pulp_ansible/app/galaxy/v3/views.py", line 275, in get_serializer_context
    super_data["deprecated_collections"] = self.deprecated_collections_context
AttributeError: 'CollectionViewSet' object has no attribute 'deprecated_collections_context'

Also available in: Atom PDF