rmm commited on
Commit
13a80d6
·
1 Parent(s): 8c3eb82

fix: email field must be populated to pass validation

Browse files

- resolves #37
- in this state, causes test_main to fail, as expected

Files changed (1) hide show
  1. src/input/input_handling.py +4 -1
src/input/input_handling.py CHANGED
@@ -67,12 +67,15 @@ def check_inputs_are_set(empty_ok:bool=False, debug:bool=False) -> bool:
67
  return empty_ok
68
 
69
  exp_input_key_stubs = ["input_latitude", "input_longitude", "input_date", "input_time"]
70
- #exp_input_key_stubs = ["input_latitude", "input_longitude", "input_author_email", "input_date", "input_time",
71
 
72
  vals = []
73
  # the author_email is global/one-off - no hash extension.
74
  if "input_author_email" in st.session_state:
75
  val = st.session_state["input_author_email"]
 
 
 
 
76
  vals.append(val)
77
  if debug:
78
  msg = f"{'input_author_email':15}, {(val is not None):8}, {val}"
 
67
  return empty_ok
68
 
69
  exp_input_key_stubs = ["input_latitude", "input_longitude", "input_date", "input_time"]
 
70
 
71
  vals = []
72
  # the author_email is global/one-off - no hash extension.
73
  if "input_author_email" in st.session_state:
74
  val = st.session_state["input_author_email"]
75
+ # if val is a string and empty, set to None
76
+ if isinstance(val, str) and not val:
77
+ val = None
78
+
79
  vals.append(val)
80
  if debug:
81
  msg = f"{'input_author_email':15}, {(val is not None):8}, {val}"