Skip to content

Commit

Permalink
fixup! show bulk btn
Browse files Browse the repository at this point in the history
  • Loading branch information
podliashanyk committed Mar 19, 2024
1 parent 1cb503d commit 247e5c7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/howitz/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,7 @@ def unselect_event(i):
except ValueError:
pass

selected_events_types = set(session.get("selected_events", {}).values())
selected_events_types.discard('portstate')
show_clear_flapping = not len(selected_events_types) > 0
show_clear_flapping = all(event == 'portstate' for event in session.get("selected_events", dict(k='v')).values())

return render_template('/responses/toggle-select.html', id=i, is_checked=False,
is_menu=len(session["selected_events"]) > 0, event_type=event_type,
Expand All @@ -504,9 +502,7 @@ def select_event(i):
except ValueError:
pass

selected_events_types = set(session.get("selected_events", {}).values())
selected_events_types.discard('portstate')
show_clear_flapping = not len(selected_events_types) > 0
show_clear_flapping = all(event == 'portstate' for event in session.get("selected_events", dict(k='v')).values())

return render_template('/responses/toggle-select.html', id=i, is_checked=True,
is_menu=len(session["selected_events"]) > 0, event_type=event_type,
Expand Down

0 comments on commit 247e5c7

Please sign in to comment.