DmitrMakeev commited on
Commit
1a336ee
1 Parent(s): 6fa93e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -780,7 +780,7 @@ def update_or_insert_user(db_name, user_data, mapping_template, gog_url):
780
  "vk_id", "chat_id", "ws_st", "ws_stop", "web_st", "fin_prog",
781
  "b_city", "b_fin", "b_ban", "b_ign", "b_baners", "b_butt", "b_mess",
782
  "shop_st", "curator", "pr1", "pr2", "pr3", "pr4", "pr5", "gc_url",
783
- "key_pr", "n_con", "canal", "data_t", 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content'
784
  ]
785
  for field in required_fields:
786
  if field not in transformed_data:
@@ -1553,7 +1553,7 @@ def add_or_update_contact(contact_data):
1553
  fields = [
1554
  'name', 'phone', 'email', 'vk_id', 'chat_id', 'ws_st', 'ws_stop', 'web_st', 'fin_prog',
1555
  'b_city', 'b_fin', 'b_ban', 'b_ign', 'b_baners', 'b_butt', 'b_mess', 'shop_st', 'curator',
1556
- 'pr1', 'pr2', 'pr3', 'pr4', 'pr5', 'gc_url', 'key_pr', 'n_con', 'canal', 'data_t', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content'
1557
  ]
1558
 
1559
  # Устанавливаем значения по умолчанию для отсутствующих полей
@@ -1708,8 +1708,8 @@ def insert_data(data, verify_phone, add_curator):
1708
  else:
1709
  ws_st = row.get('ws_st', '')
1710
 
1711
- columns = ['name', 'phone', 'email', 'vk_id', 'chat_id', 'ws_st', 'ws_stop', 'web_st', 'fin_prog', 'b_city', 'b_fin', 'b_ban', 'b_ign', 'b_baners', 'b_butt', 'b_mess', 'shop_st', 'curator', 'pr1', 'pr2', 'pr3', 'pr4', 'pr5', 'gc_url', 'key_pr', 'n_con', 'canal', 'data_t', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content']
1712
- values = [name, phone, email, row.get('vk_id', ''), row.get('chat_id', ''), ws_st, row.get('ws_stop', ''), row.get('web_st', 0), row.get('fin_prog', 0), row.get('b_city', ''), row.get('b_fin', ''), row.get('b_ban', ''), row.get('b_ign', ''), row.get('b_baners', ''), row.get('b_butt', ''), row.get('b_mess', ''), row.get('shop_st', ''), curator, row.get('pr1', ''), row.get('pr2', ''), row.get('pr3', ''), row.get('pr4', ''), row.get('pr5', ''), row.get('gc_url', ''), row.get('key_pr', ''), row.get('n_con', ''), row.get('canal', ''), data_t, row.get('utm_source', ''), row.get('utm_medium', ''), row.get('utm_campaign', ''), row.get('utm_term', ''), row.get('utm_content', '')]
1713
 
1714
  placeholders = ', '.join(['?' for _ in columns])
1715
  columns_str = ', '.join(columns)
 
780
  "vk_id", "chat_id", "ws_st", "ws_stop", "web_st", "fin_prog",
781
  "b_city", "b_fin", "b_ban", "b_ign", "b_baners", "b_butt", "b_mess",
782
  "shop_st", "curator", "pr1", "pr2", "pr3", "pr4", "pr5", "gc_url",
783
+ "key_pr", "n_con", "canal", "data_on", "data_t", 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'gcpc'
784
  ]
785
  for field in required_fields:
786
  if field not in transformed_data:
 
1553
  fields = [
1554
  'name', 'phone', 'email', 'vk_id', 'chat_id', 'ws_st', 'ws_stop', 'web_st', 'fin_prog',
1555
  'b_city', 'b_fin', 'b_ban', 'b_ign', 'b_baners', 'b_butt', 'b_mess', 'shop_st', 'curator',
1556
+ 'pr1', 'pr2', 'pr3', 'pr4', 'pr5', 'gc_url', 'key_pr', 'n_con', 'canal', 'data_on', 'data_t', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content' 'gcpc'
1557
  ]
1558
 
1559
  # Устанавливаем значения по умолчанию для отсутствующих полей
 
1708
  else:
1709
  ws_st = row.get('ws_st', '')
1710
 
1711
+ columns = ['name', 'phone', 'email', 'vk_id', 'chat_id', 'ws_st', 'ws_stop', 'web_st', 'fin_prog', 'b_city', 'b_fin', 'b_ban', 'b_ign', 'b_baners', 'b_butt', 'b_mess', 'shop_st', 'curator', 'pr1', 'pr2', 'pr3', 'pr4', 'pr5', 'gc_url', 'key_pr', 'n_con', 'canal', 'data_on', 'data_t', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'gcpc']
1712
+ values = [name, phone, email, row.get('vk_id', ''), row.get('chat_id', ''), ws_st, row.get('ws_stop', ''), row.get('web_st', 0), row.get('fin_prog', 0), row.get('b_city', ''), row.get('b_fin', ''), row.get('b_ban', ''), row.get('b_ign', ''), row.get('b_baners', ''), row.get('b_butt', ''), row.get('b_mess', ''), row.get('shop_st', ''), curator, row.get('pr1', ''), row.get('pr2', ''), row.get('pr3', ''), row.get('pr4', ''), row.get('pr5', ''), row.get('gc_url', ''), row.get('key_pr', ''), row.get('n_con', ''), row.get('canal', ''), row.get('data_on', ''),row.get('data_t', ''),row.get('utm_source', ''), row.get('utm_medium', ''), row.get('utm_campaign', ''), row.get('utm_term', ''), row.get('utm_content', ''), row.get('gcpc', '')]
1713
 
1714
  placeholders = ', '.join(['?' for _ in columns])
1715
  columns_str = ', '.join(columns)