Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ def get_last_activity_time(csv_file_path):
|
|
| 83 |
row = next(csv_reader)
|
| 84 |
|
| 85 |
if len(row) >= 3:
|
| 86 |
-
timestamp_str = row[
|
| 87 |
try:
|
| 88 |
return datetime.strptime(timestamp_str, '%Y-%m-%d %H:%M:%S')
|
| 89 |
except ValueError as ve:
|
|
@@ -183,7 +183,7 @@ def select_space_with_boundary_check(space_activity, student_id):
|
|
| 183 |
print(f"[select_space_with_boundary_check] Selected space: {selected_space['space_name']}")
|
| 184 |
|
| 185 |
# Build redirect URL
|
| 186 |
-
redirect_url = f"https://huggingface.co/spaces/{selected_space['space_name']}/?check={student_id}"
|
| 187 |
|
| 188 |
return redirect_to_space(redirect_url, selected_space, status_display)
|
| 189 |
|
|
|
|
| 83 |
row = next(csv_reader)
|
| 84 |
|
| 85 |
if len(row) >= 3:
|
| 86 |
+
timestamp_str = row[0].strip() # timestamp column
|
| 87 |
try:
|
| 88 |
return datetime.strptime(timestamp_str, '%Y-%m-%d %H:%M:%S')
|
| 89 |
except ValueError as ve:
|
|
|
|
| 183 |
print(f"[select_space_with_boundary_check] Selected space: {selected_space['space_name']}")
|
| 184 |
|
| 185 |
# Build redirect URL
|
| 186 |
+
redirect_url = f"https://huggingface.co/spaces/CIV3283/{selected_space['space_name']}/?check={student_id}"
|
| 187 |
|
| 188 |
return redirect_to_space(redirect_url, selected_space, status_display)
|
| 189 |
|