DmitrMakeev
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -78,6 +78,12 @@ for db in DATABASES:
|
|
78 |
|
79 |
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
|
83 |
|
@@ -109,6 +115,10 @@ def load_data_from_json():
|
|
109 |
user_data.setdefault('pr5', '')
|
110 |
user_data.setdefault('ad_url', '')
|
111 |
|
|
|
|
|
|
|
|
|
112 |
query = '''
|
113 |
INSERT INTO contacts (
|
114 |
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
|
@@ -137,14 +147,6 @@ def before_first_request():
|
|
137 |
|
138 |
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
|
149 |
|
150 |
|
|
|
78 |
|
79 |
|
80 |
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
|
88 |
|
89 |
|
|
|
115 |
user_data.setdefault('pr5', '')
|
116 |
user_data.setdefault('ad_url', '')
|
117 |
|
118 |
+
# Убираем плюс в начале телефона, если он присутствует
|
119 |
+
if 'Телефон' in user_data and user_data['Телефон'].startswith('+'):
|
120 |
+
user_data['Телефон'] = user_data['Телефон'][1:]
|
121 |
+
|
122 |
query = '''
|
123 |
INSERT INTO contacts (
|
124 |
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
|
|
|
147 |
|
148 |
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
|
152 |
|