DmitrMakeev
commited on
Commit
•
8238375
1
Parent(s):
e0bdf0b
Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ def init_db(db_name):
|
|
80 |
pr5 TEXT NOT NULL,
|
81 |
ad_url TEXT NOT NULL,
|
82 |
key_pr TEXT NOT NULL,
|
83 |
-
|
84 |
canal TEXT NOT NULL,
|
85 |
data_t TEXT NOT NULL
|
86 |
)
|
@@ -253,7 +253,8 @@ def load_data_from_json(json_data):
|
|
253 |
user_data.setdefault('pr4', '')
|
254 |
user_data.setdefault('pr5', '')
|
255 |
user_data.setdefault('ad_url', '')
|
256 |
-
user_data.setdefault('key_pr
|
|
|
257 |
user_data.setdefault('canal', '')
|
258 |
user_data.setdefault('data_t', '')
|
259 |
# Убираем плюс в начале телефона, если он присутствует
|
@@ -262,9 +263,9 @@ def load_data_from_json(json_data):
|
|
262 |
|
263 |
query = '''
|
264 |
INSERT INTO contacts (
|
265 |
-
name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress, shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, curator, key_pr,
|
266 |
) VALUES (
|
267 |
-
:Имя, :Телефон, :Email, :vk_id, :chat_id, :ws_st, :ws_stop, :web_st, :fin_prog, :shop_st, :pr1, :pr2, :pr3, :pr4, :pr5, :ad_url, :curator, :key_pr, :
|
268 |
)
|
269 |
'''
|
270 |
cursor.execute(query, user_data)
|
|
|
80 |
pr5 TEXT NOT NULL,
|
81 |
ad_url TEXT NOT NULL,
|
82 |
key_pr TEXT NOT NULL,
|
83 |
+
n_con TEXT NOT NULL,
|
84 |
canal TEXT NOT NULL,
|
85 |
data_t TEXT NOT NULL
|
86 |
)
|
|
|
253 |
user_data.setdefault('pr4', '')
|
254 |
user_data.setdefault('pr5', '')
|
255 |
user_data.setdefault('ad_url', '')
|
256 |
+
user_data.setdefault('key_pr', '')
|
257 |
+
user_data.setdefault('n_con', '')
|
258 |
user_data.setdefault('canal', '')
|
259 |
user_data.setdefault('data_t', '')
|
260 |
# Убираем плюс в начале телефона, если он присутствует
|
|
|
263 |
|
264 |
query = '''
|
265 |
INSERT INTO contacts (
|
266 |
+
name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress, shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, curator, key_pr, n_con, canal, data_t
|
267 |
) VALUES (
|
268 |
+
:Имя, :Телефон, :Email, :vk_id, :chat_id, :ws_st, :ws_stop, :web_st, :fin_prog, :shop_st, :pr1, :pr2, :pr3, :pr4, :pr5, :ad_url, :curator, :key_pr, :n_con, :canal, :data_t
|
269 |
)
|
270 |
'''
|
271 |
cursor.execute(query, user_data)
|