Skip to content

Commit

Permalink
Merge pull request #103 from ATIX-AG/fix_api_taxonomy
Browse files Browse the repository at this point in the history
Fix taxonomy hiding of loc/org in API
  • Loading branch information
bastian-src authored Jan 24, 2025
2 parents bd200c3 + feb5a0d commit 5e84b3c
Showing 1 changed file with 4 additions and 7 deletions.
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

0 comments on commit 5e84b3c

Please sign in to comment.