Skip to content

Commit

Permalink
Merge pull request #76 from agoenergy/74-bug-duplicate-widget-id-erro…
Browse files Browse the repository at this point in the history
…r-for-input-data-full-load-hours

fix: duplicate widget ID error (#74)
  • Loading branch information
markushal authored Nov 10, 2023
2 parents e98181c + d1ad992 commit 5a000b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/ptxboa_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ def content_deep_dive_countries(
source_region_code=region_list,
parameter_code=parameter_code,
process_code=process_code,
key_suffix="_ddc",
)
with c1:
# create plot:
Expand Down Expand Up @@ -791,6 +792,7 @@ def display_and_edit_data_table(
index: str = "source_region_code",
columns: str = "process_code",
values: str = "value",
key_suffix: str = "",
) -> pd.DataFrame:
"""Display selected input data as 2D table, which can also be edited."""
ind1 = input_data["source_region_code"].isin(source_region_code)
Expand All @@ -801,7 +803,7 @@ def display_and_edit_data_table(

if st.session_state["edit_input_data"]:
disabled = [index]
key = f"edit_input_data_{parameter_code}"
key = f"edit_input_data_{parameter_code}{key_suffix}"
else:
disabled = True
key = None
Expand Down

0 comments on commit 5a000b2

Please sign in to comment.