From bfb4af3efed1c7bf025d7c1ca44cfacaf56f252c Mon Sep 17 00:00:00 2001 From: Andy Geach Date: Thu, 16 Jan 2025 18:12:15 +0000 Subject: [PATCH] revert attempt to fix FutureWarning --- sysproduction/update_historical_prices.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sysproduction/update_historical_prices.py b/sysproduction/update_historical_prices.py index 6114c7222b..22cf87ce40 100644 --- a/sysproduction/update_historical_prices.py +++ b/sysproduction/update_historical_prices.py @@ -482,14 +482,13 @@ def write_merged_prices_for_contract( diag_prices = diagPrices(data) price_updater = updatePrices(data) - list_of_data = [] - for frequency in list_of_frequencies: - prices = diag_prices.get_prices_at_frequency_for_contract_object( + list_of_data = [ + diag_prices.get_prices_at_frequency_for_contract_object( contract_object, frequency=frequency, ) - if len(prices) > 0: - list_of_data.append(prices) + for frequency in list_of_frequencies + ] merged_prices = merge_data_with_different_freq(list_of_data)