Project

General

Profile

Actions

Refactor #33395

closed

If/else statement have equal code

Added by Maxim Petukhov about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Low
Category:
-
Target version:
Branch:
Difficulty:
trivial
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

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

Actions #1

Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9604 added
Actions #2

Updated by James Jeffers about 3 years ago

  • Target version set to Katello 4.3.0
  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases Katello 4.3.0 added
Actions #4

Updated by Maxim Petukhov about 3 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF