Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix taxonomy hiding of loc/org in API #103

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ class ResourceQuotasController < ::Api::V2::BaseController
resource_id 'resource_quota'
api_version 'v2'
api_base_url '/foreman_resource_quota/api'
end

begin
# add backwords compatibility here, the method is only available for Foreman 3.14
hide_taxonomy_options
rescue NameError
# we can ignore the error
# resource quota are not bound to org/loc - so we remove the parameters from api here
# loc/org are inherited from the ::Api::V2::BaseController in Foreman
param :location_id, Integer, show: false
param :organization_id, Integer, show: false
end

before_action :find_resource, only: %i[show update destroy]
Expand Down
Loading