Fix selecting ALL filter and changing it to default on Physical Infra #3797
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1567416
Fix selecting ALL filter and changing it to Default on Physical Infra page
(in Compute -> Physical Infrastructure -> Servers), also on Hosts page.
Steps to Reproduce:
Compute -> Physical Infrastructure -> Servers or
Compute -> Infrastructure -> Hosts
=> nothing happened, previously selected filter remained applied and it was not possible to set ALL back to ALL (Default)
Step 4 from steps to reproduce:
![filter_set_all_default](https://user-images.githubusercontent.com/13417815/38986531-f1480d46-43cc-11e8-8582-5c84c5874b04.png)
Before:
![filter_before](https://user-images.githubusercontent.com/13417815/38986652-5b1e8934-43cd-11e8-81d5-b8e600bcd327.png)
After:
![filter_after](https://user-images.githubusercontent.com/13417815/38986534-f3d5ad02-43cc-11e8-857a-6458fb684aff.png)
Details:
Removing unnecessary line of the code fixed the bug. The problem was that default search was loaded (
load_default_search
method) when clicking on ALL filter because@edit[:selected]
was set tofalse
. As I remember, it was me who added the same line to the code some time ago. Adding it was not necessary so I am sure we can remove it.