Spaces:
Runtime error
Runtime error
Update pag/edit.py
Browse files- pag/edit.py +2 -2
pag/edit.py
CHANGED
|
@@ -144,8 +144,8 @@ def edit_fields():
|
|
| 144 |
if delete:
|
| 145 |
if len(gdf) == 1 and (gdf['name'] == field_name).all(): # Check if this is the only field left
|
| 146 |
os.remove(fields_file_path) # Delete the .parquet file if it's the last field
|
| 147 |
-
|
| 148 |
-
|
| 149 |
st.success("All fields deleted. The data file has been removed.")
|
| 150 |
time.sleep(0.3)
|
| 151 |
st.rerun()
|
|
|
|
| 144 |
if delete:
|
| 145 |
if len(gdf) == 1 and (gdf['name'] == field_name).all(): # Check if this is the only field left
|
| 146 |
os.remove(fields_file_path) # Delete the .parquet file if it's the last field
|
| 147 |
+
if os.path.exists(history_file_path):
|
| 148 |
+
os.remove(history_file_path)
|
| 149 |
st.success("All fields deleted. The data file has been removed.")
|
| 150 |
time.sleep(0.3)
|
| 151 |
st.rerun()
|