VyLala commited on
Commit
2d64447
·
verified ·
1 Parent(s): 16a4d26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -323,9 +323,17 @@ with gr.Blocks() as interface:
323
  old_sample_list = [s.strip() for s in old_samples.split(",") if s.strip()]
324
  all_samples = list(dict.fromkeys(old_sample_list + samples)) # deduplicate while preserving order
325
  new_sample_string = ", ".join(all_samples)
326
-
 
 
 
 
 
 
 
327
  worksheet.update_cell(i, samples_col + 1, new_sample_string)
328
- worksheet.update_cell(i, recent_time_col + 1, timestamp)
 
329
  print(f"✅ Updated existing user row for: {email}")
330
  return
331
 
 
323
  old_sample_list = [s.strip() for s in old_samples.split(",") if s.strip()]
324
  all_samples = list(dict.fromkeys(old_sample_list + samples)) # deduplicate while preserving order
325
  new_sample_string = ", ".join(all_samples)
326
+
327
+ # Update recent_time to store history
328
+ old_timestamp = row[recent_time_col].strip() if len(row) > recent_time_col else ""
329
+ if old_timestamp:
330
+ new_timestamp = f"{old_timestamp}, {timestamp}"
331
+ else:
332
+ new_timestamp = timestamp
333
+
334
  worksheet.update_cell(i, samples_col + 1, new_sample_string)
335
+ worksheet.update_cell(i, recent_time_col + 1, new_timestamp)
336
+
337
  print(f"✅ Updated existing user row for: {email}")
338
  return
339