DmitrMakeev
commited on
Commit
•
405df95
1
Parent(s):
02ab734
Update app.py
Browse files
app.py
CHANGED
@@ -801,7 +801,7 @@ def update_or_insert_user(db_name, user_data, mapping_template):
|
|
801 |
transformed_data[field] = ""
|
802 |
|
803 |
if user:
|
804 |
-
|
805 |
|
806 |
update_query = "UPDATE contacts SET "
|
807 |
update_values = []
|
@@ -809,7 +809,7 @@ def update_or_insert_user(db_name, user_data, mapping_template):
|
|
809 |
update_query += f"{column} = ?, "
|
810 |
update_values.append(value)
|
811 |
update_query += "web_st = ? WHERE email = ?"
|
812 |
-
update_values.extend([
|
813 |
cursor.execute(update_query, update_values)
|
814 |
else:
|
815 |
columns = ', '.join(transformed_data.keys()) + ", web_st"
|
|
|
801 |
transformed_data[field] = ""
|
802 |
|
803 |
if user:
|
804 |
+
web_st = int(user[0]) + 1
|
805 |
|
806 |
update_query = "UPDATE contacts SET "
|
807 |
update_values = []
|
|
|
809 |
update_query += f"{column} = ?, "
|
810 |
update_values.append(value)
|
811 |
update_query += "web_st = ? WHERE email = ?"
|
812 |
+
update_values.extend([web_st, email])
|
813 |
cursor.execute(update_query, update_values)
|
814 |
else:
|
815 |
columns = ', '.join(transformed_data.keys()) + ", web_st"
|