Spaces:
Sleeping
Sleeping
Update utils/database_handler.py
Browse files
utils/database_handler.py
CHANGED
|
@@ -40,8 +40,8 @@ def save_user(name, phone, email, password):
|
|
| 40 |
new_user = {"Name": name, "Phone": str(phone), "Email": email, "Password": password}
|
| 41 |
df = pd.concat([df, pd.DataFrame([new_user])], ignore_index=True)
|
| 42 |
|
| 43 |
-
#
|
| 44 |
-
df = df.astype(str)
|
| 45 |
|
| 46 |
# Save back to Excel
|
| 47 |
try:
|
|
|
|
| 40 |
new_user = {"Name": name, "Phone": str(phone), "Email": email, "Password": password}
|
| 41 |
df = pd.concat([df, pd.DataFrame([new_user])], ignore_index=True)
|
| 42 |
|
| 43 |
+
# Ensure column alignment and convert all columns to strings
|
| 44 |
+
df = df[["Name", "Phone", "Email", "Password"]].astype(str)
|
| 45 |
|
| 46 |
# Save back to Excel
|
| 47 |
try:
|