DmitrMakeev
commited on
Commit
•
fc8d727
1
Parent(s):
4bd1c93
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import logging
|
|
11 |
import csv
|
12 |
import io
|
13 |
from urllib.parse import quote
|
14 |
-
|
15 |
from datetime import datetime
|
16 |
import pytz
|
17 |
|
@@ -1924,50 +1924,8 @@ def from_shop_st2():
|
|
1924 |
|
1925 |
|
1926 |
|
1927 |
-
# Функция для замены NULL на пустые строки
|
1928 |
-
|
1929 |
-
cursor = conn.cursor()
|
1930 |
-
query = """
|
1931 |
-
UPDATE contacts
|
1932 |
-
SET
|
1933 |
-
name = COALESCE(name, ''),
|
1934 |
-
phone = COALESCE(phone, ''),
|
1935 |
-
email = COALESCE(email, ''),
|
1936 |
-
vk_id = COALESCE(vk_id, ''),
|
1937 |
-
chat_id = COALESCE(chat_id, ''),
|
1938 |
-
ws_st = COALESCE(ws_st, ''),
|
1939 |
-
ws_stop = COALESCE(ws_stop, ''),
|
1940 |
-
web_st = COALESCE(web_st, ''),
|
1941 |
-
fin_prog = COALESCE(fin_prog, ''),
|
1942 |
-
b_city = COALESCE(b_city, ''),
|
1943 |
-
b_fin = COALESCE(b_fin, ''),
|
1944 |
-
b_ban = COALESCE(b_ban, ''),
|
1945 |
-
b_ign = COALESCE(b_ign, ''),
|
1946 |
-
b_baners = COALESCE(b_baners, ''),
|
1947 |
-
b_butt = COALESCE(b_butt, ''),
|
1948 |
-
b_mess = COALESCE(b_mess, ''),
|
1949 |
-
shop_st = COALESCE(shop_st, ''),
|
1950 |
-
curator = COALESCE(curator, ''),
|
1951 |
-
pr1 = COALESCE(pr1, ''),
|
1952 |
-
pr2 = COALESCE(pr2, ''),
|
1953 |
-
pr3 = COALESCE(pr3, ''),
|
1954 |
-
pr4 = COALESCE(pr4, ''),
|
1955 |
-
pr5 = COALESCE(pr5, ''),
|
1956 |
-
gc_url = COALESCE(gc_url, ''),
|
1957 |
-
key_pr = COALESCE(key_pr, ''),
|
1958 |
-
n_con = COALESCE(n_con, ''),
|
1959 |
-
canal = COALESCE(canal, ''),
|
1960 |
-
data_on = COALESCE(data_on, ''),
|
1961 |
-
data_t = COALESCE(data_t, ''),
|
1962 |
-
utm_source = COALESCE(utm_source, ''),
|
1963 |
-
utm_medium = COALESCE(utm_medium, ''),
|
1964 |
-
utm_campaign = COALESCE(utm_campaign, ''),
|
1965 |
-
utm_term = COALESCE(utm_term, ''),
|
1966 |
-
utm_content = COALESCE(utm_content, ''),
|
1967 |
-
gcpc = COALESCE(gcpc, '')
|
1968 |
-
"""
|
1969 |
-
cursor.execute(query)
|
1970 |
-
conn.commit()
|
1971 |
|
1972 |
# Маршрут для приема GET запроса
|
1973 |
@app.route('/order3', methods=['GET'])
|
|
|
11 |
import csv
|
12 |
import io
|
13 |
from urllib.parse import quote
|
14 |
+
from base import replace_null_with_empty_string
|
15 |
from datetime import datetime
|
16 |
import pytz
|
17 |
|
|
|
1924 |
|
1925 |
|
1926 |
|
1927 |
+
# Функция для замены NULL на пустые строки в base_py
|
1928 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1929 |
|
1930 |
# Маршрут для приема GET запроса
|
1931 |
@app.route('/order3', methods=['GET'])
|