Skip to content

Commit

Permalink
Always consider event row state when creating table event
Browse files Browse the repository at this point in the history
  • Loading branch information
podliashanyk committed May 23, 2024
1 parent f991774 commit 9883d93
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/howitz/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def logout_handler():
current_app.logger.info("Logged out successfully.")


def get_current_events(extended_event_format=False):
def get_current_events():
try:
current_app.event_manager.get_events()
except RetryError as retryErr: # Intermittent error in Zino
Expand Down Expand Up @@ -122,11 +122,8 @@ def get_current_events(extended_event_format=False):

table_events = []
for c in events_sorted.values():
if extended_event_format:
table_events.append(create_table_event(c, expanded=str(c.id) in session["expanded_events"],
selected=str(c.id) in session["selected_events"]))
else:
table_events.append(create_table_event(c)["event"])
table_events.append(create_table_event(c, expanded=str(c.id) in session["expanded_events"],
selected=str(c.id) in session["selected_events"]))

current_app.logger.debug('TABLE EVENTS %s', table_events[0])

Expand Down Expand Up @@ -513,7 +510,7 @@ def bulk_update_events_status():
current_app.logger.debug("SELECTED EVENTS %s", session["selected_events"])

# Rerender whole events table
poll_events_list = get_current_events(extended_event_format=True)
poll_events_list = get_current_events()
return render_template('/responses/bulk-update-events-status.html', poll_event_list=poll_events_list)


Expand Down

0 comments on commit 9883d93

Please sign in to comment.