Project

Profile

Help

Issue #3583

500 when publishing a repository without any versions

Added by amacdona@redhat.com over 2 years ago. Updated 10 months ago.

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

Description

~/3/pulp_file ❯ http POST http://dev.pulp3:8000/api/v3/publishers/file/007682b4-f522-469b-92c9-baeca276529a/publish/ repository=http://dev.pulp3:8000/api/v3/repositories/96a7048f-bda6-4ccc-8317-a8dca80defae/
HTTP/1.0 500 Internal Server Error

Traceback:  

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
  58.         return view_func(*args, **kwargs)

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/viewsets.py" in view
  95.             return self.dispatch(request, *args, **kwargs)

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py" in dispatch
  494.             response = self.handle_exception(exc)

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py" in handle_exception
  454.             self.raise_uncaught_exception(exc)

File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py" in dispatch
  491.             response = handler(request, *args, **kwargs)

File "/home/vagrant/devel/pulp_file/pulp_file/app/viewsets.py" in publish
  147.             [repository_version.repository, publisher],

Exception Type: AttributeError at /api/v3/publishers/file/007682b4-f522-469b-92c9-baeca276529a/publish/
Exception Value: 'NoneType' object has no attribute 'repository'

Related issues

Copied to Ansible Plugin - Issue #3610: 500 when publishing a repository without any versionsNEW<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 5ffb33d8 View on GitHub
Added by dalley over 2 years ago

Validates that repository has a version to publish

Raise a ValidationError if you try to publish a repository which does not have any versions.

closes #3583 https://pulp.plan.io/issues/3583

History

#1 Updated by dalley over 2 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 36

#2 Updated by dalley over 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
  • Tags Pulp 3, Pulp 3 MVP added

#3 Updated by dalley over 2 years ago

  • Status changed from ASSIGNED to POST

#4 Updated by dalley over 2 years ago

  • Status changed from POST to MODIFIED

#5 Updated by daviddavis over 2 years ago

  • Copied to Issue #3610: 500 when publishing a repository without any versions added

#6 Updated by bmbouter over 1 year ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)

#7 Updated by bmbouter 10 months ago

  • Sprint/Milestone set to 0.1.0

#8 Updated by bmbouter 10 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF