Project

General

Profile

Refactor #33395

If/else statement have equal code

Added by Maxim Petukhov 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Low
Category:
-
Target version:
Branch:
Difficulty:
trivial
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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

Associated revisions

Revision 0b8ccb23 (diff)
Added by Maxim Petukhov 8 months ago

Fixes #33395 - remove if/else statment

Remove if/else statement from _host_synced_content_select.html.erb

History

#1 Updated by The Foreman Bot 9 months ago

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

#2 Updated by James Jeffers 9 months ago

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

#3 Updated by The Foreman Bot 8 months ago

  • Fixed in Releases Katello 4.3.0 added

#4 Updated by Maxim Petukhov 8 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF