Spaces:
Running
Running
DOI is case-insensitive: normalize to lowercase
Browse filesLowercase the entered DOI wherever it's used as an identifier (PDF links,
submission storage path, version lookup) so case doesn't matter and the same
DOI always maps to the same document folder / submission.
app.py
CHANGED
|
@@ -213,7 +213,7 @@ def _save_draft() -> None:
|
|
| 213 |
|
| 214 |
|
| 215 |
def _find_versions() -> None:
|
| 216 |
-
trial_id = st.session_state.trial_id.strip()
|
| 217 |
username = st.session_state.username.strip()
|
| 218 |
if not trial_id or not username:
|
| 219 |
st.session_state.versions = []
|
|
@@ -306,7 +306,7 @@ def _load_selected() -> None:
|
|
| 306 |
|
| 307 |
|
| 308 |
def _submit() -> None:
|
| 309 |
-
trial_id = st.session_state.trial_id.strip()
|
| 310 |
username = st.session_state.username.strip()
|
| 311 |
if not trial_id or not username:
|
| 312 |
st.session_state.last_result = {"kind": "error", "msg": "trial_id and username are required."}
|
|
@@ -365,7 +365,7 @@ def render_pdf_panel() -> None:
|
|
| 365 |
by X-Frame-Options and re-sending bytes made the form laggy.
|
| 366 |
"""
|
| 367 |
st.markdown("#### 📄 Reference document")
|
| 368 |
-
doc = st.session_state.get("trial_id", "").strip()
|
| 369 |
if not doc:
|
| 370 |
st.caption(
|
| 371 |
"Enter the DOI (e.g. `10.1200_jco.22.01989`) on the right "
|
|
|
|
| 213 |
|
| 214 |
|
| 215 |
def _find_versions() -> None:
|
| 216 |
+
trial_id = st.session_state.trial_id.strip().lower() # DOI is case-insensitive
|
| 217 |
username = st.session_state.username.strip()
|
| 218 |
if not trial_id or not username:
|
| 219 |
st.session_state.versions = []
|
|
|
|
| 306 |
|
| 307 |
|
| 308 |
def _submit() -> None:
|
| 309 |
+
trial_id = st.session_state.trial_id.strip().lower() # DOI is case-insensitive
|
| 310 |
username = st.session_state.username.strip()
|
| 311 |
if not trial_id or not username:
|
| 312 |
st.session_state.last_result = {"kind": "error", "msg": "trial_id and username are required."}
|
|
|
|
| 365 |
by X-Frame-Options and re-sending bytes made the form laggy.
|
| 366 |
"""
|
| 367 |
st.markdown("#### 📄 Reference document")
|
| 368 |
+
doc = st.session_state.get("trial_id", "").strip().lower() # DOI is case-insensitive
|
| 369 |
if not doc:
|
| 370 |
st.caption(
|
| 371 |
"Enter the DOI (e.g. `10.1200_jco.22.01989`) on the right "
|