Skip to content

Commit

Permalink
Fix some 500 errors in the galaxy api
Browse files Browse the repository at this point in the history
(cherry picked from commit d3cda19)
  • Loading branch information
gerrod3 authored and mdellweg committed Nov 12, 2024
1 parent 1735474 commit b05d304
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES/galaxy500s.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed some 500 errors when browsing the Galaxy API.
2 changes: 1 addition & 1 deletion pulp_ansible/app/galaxy/v3/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _repository_version(self):

repo_version = distro.repository.latest_version() if distro.repository else None
self.pulp_context = {path: repo_version}
self._repo = distro.repository.ansible_ansiblerepository
self._repo = repo_version.repository.cast() if repo_version else None
self._repo_version = repo_version
return repo_version

Expand Down
10 changes: 5 additions & 5 deletions pulp_ansible/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"dynaconf_merge": True,
}

DRF_ACCESS_POLICY = {
"dynaconf_merge_unique": True,
"reusable_conditions": ["pulp_ansible.app.global_access_conditions"],
}

ANSIBLE_API_HOSTNAME = "https://" + socket.getfqdn()
ANSIBLE_CONTENT_HOSTNAME = settings.CONTENT_ORIGIN + "/pulp/content"
ANSIBLE_SIGNATURE_REQUIRE_VERIFICATION = True
Expand All @@ -30,8 +35,3 @@
ANSIBLE_COLLECT_DOWNLOAD_COUNT = False
ANSIBLE_AUTHENTICATION_CLASSES = settings.REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"]
ANSIBLE_PERMISSION_CLASSES = settings.REST_FRAMEWORK["DEFAULT_PERMISSION_CLASSES"]

DRF_ACCESS_POLICY = {
"dynaconf_merge_unique": True,
"reusable_conditions": ["pulp_ansible.app.global_access_conditions"],
}

0 comments on commit b05d304

Please sign in to comment.