DmitrMakeev commited on
Commit
c38a672
·
verified ·
1 Parent(s): df074cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -2101,6 +2101,16 @@ def from_allow():
2101
  print("New record inserted into database.")
2102
 
2103
  conn.commit()
 
 
 
 
 
 
 
 
 
 
2104
 
2105
  # Замена NULL на пустые строки
2106
  replace_null_with_empty_string(conn)
 
2101
  print("New record inserted into database.")
2102
 
2103
  conn.commit()
2104
+
2105
+ # Проверка что данные сохранились правильно
2106
+ cursor.execute("SELECT * FROM contacts WHERE email = ? OR phone = ?", (email, phone))
2107
+ result_check = cursor.fetchone()
2108
+ if result_check:
2109
+ pr5_check = result_check[21] if result_check[21] else '{}'
2110
+ pr5_data_check = json.loads(pr5_check)
2111
+ print(f"Post-commit check. Loaded JSON: {pr5_data_check}")
2112
+ else:
2113
+ print("Post-commit check failed. No record found.")
2114
 
2115
  # Замена NULL на пустые строки
2116
  replace_null_with_empty_string(conn)