DmitrMakeev commited on
Commit
9f7ca08
1 Parent(s): 2bc7588

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -162,6 +162,7 @@ def add_data_gc():
162
  name = request.args.get('name')
163
  phone = request.args.get('phone')
164
  email = request.args.get('email')
 
165
  vk_id = request.args.get('vk_id', '')
166
  chat_id = request.args.get('chat_id', '')
167
  ws_statys = request.args.get('ws_st', '')
@@ -191,19 +192,19 @@ def add_data_gc():
191
  if existing_contact:
192
  cursor.execute('''
193
  UPDATE contacts SET
194
- name = ?, email = ?, vk_id = ?, chat_id = ?, ws_statys = ?, ws_stop = ?,
195
  web_statys = ?, fin_progress = ?, shop_statys_full = ?, pr1 = ?, pr2 = ?,
196
  pr3 = ?, pr4 = ?, pr5 = ?, ad_url = ?
197
  WHERE phone = ? OR email = ?
198
- ''', (name, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
199
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, phone, email))
200
  else:
201
  cursor.execute('''
202
  INSERT INTO contacts (
203
- name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
204
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url
205
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
206
- ''', (name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
207
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url))
208
 
209
  conn.commit()
 
162
  name = request.args.get('name')
163
  phone = request.args.get('phone')
164
  email = request.args.get('email')
165
+ curator = request.args.get('curator', '') # Добавлен новый параметр
166
  vk_id = request.args.get('vk_id', '')
167
  chat_id = request.args.get('chat_id', '')
168
  ws_statys = request.args.get('ws_st', '')
 
192
  if existing_contact:
193
  cursor.execute('''
194
  UPDATE contacts SET
195
+ name = ?, email = ?, curator = ?, vk_id = ?, chat_id = ?, ws_statys = ?, ws_stop = ?,
196
  web_statys = ?, fin_progress = ?, shop_statys_full = ?, pr1 = ?, pr2 = ?,
197
  pr3 = ?, pr4 = ?, pr5 = ?, ad_url = ?
198
  WHERE phone = ? OR email = ?
199
+ ''', (name, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
200
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, phone, email))
201
  else:
202
  cursor.execute('''
203
  INSERT INTO contacts (
204
+ name, phone, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
205
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url
206
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
207
+ ''', (name, phone, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
208
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url))
209
 
210
  conn.commit()