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

Fixes #33395 - remove if/else statment #9604

Merged
merged 1 commit into from
Sep 10, 2021
Merged

Conversation

maccelf
Copy link
Contributor

@maccelf maccelf commented Sep 2, 2021

in app/views/overrides/activation_keys/_host_synced_content_select.html.erb
if/else statement have equal code:

if using_hostgroups_page?
    select_tag ks_repo_select_id,  view_to_options(kickstart_options, kickstart_repo_id, blank_or_inherit_with_id(f, :kickstart_repository)), :data => {"spinner_path" => spinner_path, "kickstart-repository-id" => kickstart_repo_id},
               :class => 'form-control',  :name => ks_repo_select_name, :disabled => kickstart_options.empty?
else
    select_tag ks_repo_select_id,  view_to_options(kickstart_options, kickstart_repo_id, blank_or_inherit_with_id(f, :kickstart_repository)), :data => {"spinner_path" => spinner_path, "kickstart-repository-id" => kickstart_repo_id}, :class => 'form-control',  :name => ks_repo_select_name, :disabled => kickstart_options.empty?
end

so, i think if/else statement is unnecessary

Remove if/else statement from _host_synced_content_select.html.erb
@theforeman-bot
Copy link

Can one of the admins verify this patch?

@theforeman-bot
Copy link

Issues: #33395

@jlsherrill
Copy link
Member

[test katello]

@jlsherrill
Copy link
Member

thanks @maccelf will merge after tests run!

@jlsherrill jlsherrill merged commit 0b8ccb2 into Katello:master Sep 10, 2021
@maccelf maccelf deleted the 33395 branch September 12, 2021 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants