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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -162,7 +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
- 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', '')
@@ -229,6 +229,7 @@ def add_contact():
229
  name = request.args.get('name')
230
  phone = request.args.get('phone')
231
  email = request.args.get('email')
 
232
  vk_id = request.args.get('vk_id', '')
233
  chat_id = request.args.get('chat_id', '')
234
  ws_statys = request.args.get('ws_statys', '')
@@ -258,19 +259,19 @@ def add_contact():
258
  if existing_contact:
259
  cursor.execute('''
260
  UPDATE contacts SET
261
- name = ?, email = ?, vk_id = ?, chat_id = ?, ws_statys = ?, ws_stop = ?,
262
  web_statys = ?, fin_progress = ?, shop_statys_full = ?, pr1 = ?, pr2 = ?,
263
  pr3 = ?, pr4 = ?, pr5 = ?, ad_url = ?
264
  WHERE phone = ? OR email = ?
265
- ''', (name, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
266
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, phone, email))
267
  else:
268
  cursor.execute('''
269
  INSERT INTO contacts (
270
- name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
271
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url
272
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
273
- ''', (name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
274
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url))
275
 
276
  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('cur', '') # Добавлен новый параметр
166
  vk_id = request.args.get('vk_id', '')
167
  chat_id = request.args.get('chat_id', '')
168
  ws_statys = request.args.get('ws_st', '')
 
229
  name = request.args.get('name')
230
  phone = request.args.get('phone')
231
  email = request.args.get('email')
232
+ curator = request.args.get('cur', '') # Добавлен новый параметр
233
  vk_id = request.args.get('vk_id', '')
234
  chat_id = request.args.get('chat_id', '')
235
  ws_statys = request.args.get('ws_statys', '')
 
259
  if existing_contact:
260
  cursor.execute('''
261
  UPDATE contacts SET
262
+ name = ?, email = ?, curator = ?, vk_id = ?, chat_id = ?, ws_statys = ?, ws_stop = ?,
263
  web_statys = ?, fin_progress = ?, shop_statys_full = ?, pr1 = ?, pr2 = ?,
264
  pr3 = ?, pr4 = ?, pr5 = ?, ad_url = ?
265
  WHERE phone = ? OR email = ?
266
+ ''', (name, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
267
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, phone, email))
268
  else:
269
  cursor.execute('''
270
  INSERT INTO contacts (
271
+ name, phone, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
272
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url
273
  ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
274
+ ''', (name, phone, email, curator, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
275
  shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url))
276
 
277
  conn.commit()