Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.7.5] - 2025-05-12

### Fixed

- Fixed bug when changing concentration unit after adding metadata

## [1.7.4] - 2025-02-20

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion ms_reader/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.7.4"
__version__ = "1.7.5"
14 changes: 8 additions & 6 deletions ms_reader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,8 @@ def convert_df(df):
# Check that the "concentration_unit" and "lloq_box" keys do not exist in session_state
# we then retrieve and store the value of widgets with this key
if "concentration_unit" not in st.session_state:
st.session_state["concentration_unit"] = CONCENTRATION_UNIT
elif reader.metadata is not None:
st.session_state["concentration_unit"] = QUANTITY_UNIT

st.session_state["concentration_unit"] = None

if "lloq_box" not in st.session_state:
st.session_state["lloq_box"] = False

Expand Down Expand Up @@ -256,9 +254,13 @@ def convert_df(df):
label="Input the concentration unit"
if reader.metadata is None
else "Input the quantity unit",
key="concentration_unit",
# value = CONCENTRATION_UNIT if reader.metadata is None else QUANTITY_UNIT
# key="concentration_unit",
value = CONCENTRATION_UNIT if reader.metadata is None else QUANTITY_UNIT,
)
# Save new concentration unit to session state if it is different
st.session_state["concentration_unit"] = concentration_unit
# Re-applies function if unit is modified
reader.generate_concentrations_table(loq_export=st.session_state["lloq_box"], base_unit=st.session_state["concentration_unit"])

destination = st.text_input("Input destination path for excel files")
preview = st.form_submit_button("Preview")
Expand Down
Loading