Skip to content

Commit

Permalink
segfault test
Browse files Browse the repository at this point in the history
  • Loading branch information
kdetry committed Oct 11, 2024
1 parent 14088a0 commit 32edeb2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions pdr_backend/pdr_dashboard/callbacks/callbacks_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
select_or_clear_all_by_table,
check_data_loaded,
)

from pdr_backend.pdr_dashboard.util.db import get_feeds_for_favourite_predictoors

# pylint: disable=too-many-statements
def get_callbacks_home(app):
Expand Down Expand Up @@ -45,7 +45,8 @@ def get_initial_data(_):
app.data.predictoors_data[max_profit_predictoor_index, "user"]
]

selected_feeds, feed_data = app.data.get_feeds_for_favourite_predictoors(
selected_feeds, feed_data = get_feeds_for_favourite_predictoors(
app,
feed_data,
selected_predictoors_addrs,
)
Expand Down
14 changes: 7 additions & 7 deletions pdr_backend/pdr_dashboard/util/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,13 +676,13 @@ def homepage_predictoors_cols(self) -> Tuple[Tuple, pl.DataFrame]:

return (columns, hidden_columns), data

def get_feeds_for_favourite_predictoors(self, feed_data, predictoor_addrs):
feed_ids = self.feed_ids_based_on_predictoors(predictoor_addrs)
def get_feeds_for_favourite_predictoors(app, feed_data, predictoor_addrs):
feed_ids = app.data.feed_ids_based_on_predictoors(predictoor_addrs)

if not feed_ids:
return [], feed_data
if not feed_ids:
return [], feed_data

feed_data = self.formatted_feeds_home_page_table_data.clone()
feed_data = feed_data.filter(feed_data["contract"].is_in(feed_ids))
feed_data = app.data.formatted_feeds_home_page_table_data.clone()
feed_data = feed_data.filter(feed_data["contract"].is_in(feed_ids))

return list(range(len(feed_ids))), feed_data
return list(range(len(feed_ids))), feed_data

0 comments on commit 32edeb2

Please sign in to comment.