diff --git a/src/classes/Changelog.py b/src/classes/Changelog.py index 0c667aa..891a3dc 100644 --- a/src/classes/Changelog.py +++ b/src/classes/Changelog.py @@ -7,7 +7,7 @@ from classes.ColorText import colorText -VERSION = "2.19" +VERSION = "2.20" changelog = colorText.BOLD + '[ChangeLog]\n' + colorText.END + colorText.BLUE + ''' [1.00 - Beta] @@ -285,4 +285,6 @@ [2.19] 1. New Index (Group of Indices) `16 > Sectoral Indices` added +[2.20] +1. Bugfixes - Clear cache button random key added to fix re-rendering issues ''' + colorText.END diff --git a/src/streamlit_app.py b/src/streamlit_app.py index ea52b9b..8e700d1 100644 --- a/src/streamlit_app.py +++ b/src/streamlit_app.py @@ -1,3 +1,4 @@ +import random import streamlit as st import streamlit.components.v1 as components import requests @@ -51,6 +52,7 @@ def show_df_as_result_table(): clear_cache_btn = cc.button( label='Clear Cached Data', use_container_width=True, + key=random.randint(1,999999999), ) if clear_cache_btn: os.system('rm stock_data_*.pkl') @@ -63,7 +65,7 @@ def show_df_as_result_table(): type='secondary', use_container_width=True ) - if int(execute_inputs[0]) < 15: + if type(execute_inputs[0]) == str or int(execute_inputs[0]) < 15: df.index = df.index.map(lambda x: "https://in.tradingview.com/chart?symbol=NSE%3A" + x) df.index = df.index.map(lambda x: f'{x.split("%3A")[-1]}') elif execute_inputs[0] == '16':