Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -1689,7 +1689,7 @@ DATABASE2 = 'data_gc.db' | |
| 1689 | 
             
            def verify_phone_number2(phone_number):
         | 
| 1690 | 
             
                current_curator_index = 0
         | 
| 1691 | 
             
                verifikation_start = "1"  # Глобальная переменная для управления верификацией
         | 
| 1692 | 
            -
             | 
| 1693 | 
             
                if verifikation_start == "1":
         | 
| 1694 | 
             
                    full_url_ver = f"{wa_url}{wa_ak}{ws_url_ver}{wa_api_key}"
         | 
| 1695 | 
             
                    payload = json.dumps({"phoneNumber": phone_number})
         | 
| @@ -1710,6 +1710,8 @@ def insert_data2(data, template_key): | |
| 1710 | 
             
                mapping_template_cur = mapp_templates.get(template_key, mt_avp)
         | 
| 1711 |  | 
| 1712 | 
             
                for row in data:
         | 
|  | |
|  | |
| 1713 | 
             
                    utc_now = datetime.utcnow()
         | 
| 1714 | 
             
                    msk_tz = pytz.timezone('Europe/Moscow')
         | 
| 1715 | 
             
                    msk_now = utc_now.replace(tzinfo=pytz.utc).astimezone(msk_tz)
         | 
| @@ -1763,9 +1765,8 @@ def insert_data2(data, template_key): | |
| 1763 | 
             
            def upload_csv():
         | 
| 1764 | 
             
                global verifikation_start, curator_on_off
         | 
| 1765 |  | 
| 1766 | 
            -
             | 
| 1767 | 
            -
                 | 
| 1768 | 
            -
                template_key = request.form.get('template_key', 'avp')
         | 
| 1769 |  | 
| 1770 | 
             
                if 'file' not in request.files:
         | 
| 1771 | 
             
                    return jsonify({"error": "No file part"}), 400
         | 
|  | |
| 1689 | 
             
            def verify_phone_number2(phone_number):
         | 
| 1690 | 
             
                current_curator_index = 0
         | 
| 1691 | 
             
                verifikation_start = "1"  # Глобальная переменная для управления верификацией
         | 
| 1692 | 
            +
             | 
| 1693 | 
             
                if verifikation_start == "1":
         | 
| 1694 | 
             
                    full_url_ver = f"{wa_url}{wa_ak}{ws_url_ver}{wa_api_key}"
         | 
| 1695 | 
             
                    payload = json.dumps({"phoneNumber": phone_number})
         | 
|  | |
| 1710 | 
             
                mapping_template_cur = mapp_templates.get(template_key, mt_avp)
         | 
| 1711 |  | 
| 1712 | 
             
                for row in data:
         | 
| 1713 | 
            +
                    verifikation_start = '1'
         | 
| 1714 | 
            +
                    curator_on_off = '1'
         | 
| 1715 | 
             
                    utc_now = datetime.utcnow()
         | 
| 1716 | 
             
                    msk_tz = pytz.timezone('Europe/Moscow')
         | 
| 1717 | 
             
                    msk_now = utc_now.replace(tzinfo=pytz.utc).astimezone(msk_tz)
         | 
|  | |
| 1765 | 
             
            def upload_csv():
         | 
| 1766 | 
             
                global verifikation_start, curator_on_off
         | 
| 1767 |  | 
| 1768 | 
            +
             | 
| 1769 | 
            +
                template_key = 'csv'
         | 
|  | |
| 1770 |  | 
| 1771 | 
             
                if 'file' not in request.files:
         | 
| 1772 | 
             
                    return jsonify({"error": "No file part"}), 400
         |