Skip to content

Commit

Permalink
Hide taxonomy in API for Foreman > 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
nadjaheitmann committed Jan 15, 2025
1 parent 26105a9 commit 05415f1
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ class ResourceQuotasController < ::Api::V2::BaseController
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

Check failure on line 19 in app/controllers/foreman_resource_quota/api/v2/resource_quotas_controller.rb

View workflow job for this annotation

GitHub Actions / rubocop / Rubocop

Style/RescueStandardError: Avoid rescuing without specifying an error class.
# we can ignore the error
end

before_action :find_resource, only: %i[show update destroy]
before_action :custom_find_resource, only: %i[utilization missing_hosts hosts users usergroups]

Expand Down

0 comments on commit 05415f1

Please sign in to comment.