Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -119,11 +119,14 @@ def submit():
|
|
| 119 |
})
|
| 120 |
|
| 121 |
if customer_login.get('id'):
|
|
|
|
| 122 |
return jsonify({'success': True})
|
| 123 |
else:
|
|
|
|
| 124 |
return jsonify({'error': 'Failed to create record'}), 500
|
| 125 |
|
| 126 |
except Exception as e:
|
|
|
|
| 127 |
return jsonify({'error': str(e)}), 500
|
| 128 |
|
| 129 |
|
|
|
|
| 119 |
})
|
| 120 |
|
| 121 |
if customer_login.get('id'):
|
| 122 |
+
print(f"Success: Customer record created with ID: {customer_login['id']}")
|
| 123 |
return jsonify({'success': True})
|
| 124 |
else:
|
| 125 |
+
print("Failed: No ID returned after creating the record.")
|
| 126 |
return jsonify({'error': 'Failed to create record'}), 500
|
| 127 |
|
| 128 |
except Exception as e:
|
| 129 |
+
print(f"Error: {str(e)}") # Print error message if an exception occurs
|
| 130 |
return jsonify({'error': str(e)}), 500
|
| 131 |
|
| 132 |
|