Pārlūkot izejas kodu

dict correction

contab 1 gadu atpakaļ
vecāks
revīzija
89be66bd1e
2 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 2 2
      mentor_mailer.py
  2. 2 2
      winmentor/tax_mailer.py

+ 2 - 2
mentor_mailer.py

@@ -54,13 +54,13 @@ taxes = mailer.tax_mailer(office, m_list, mentor, yag, month_, send=False)
 sms = Smslink('A297457A64817C11', 'U7BYbyXCot2I5hvR')
 # resp = sms.send()
 # print(resp.text)
-for company, data in m_list.items():
+for company, contact in m_list.items():
     for tax in taxes:
         # print(repr(tax))
         if company == tax.name:
             # print(repr(tax))
             sms.message = repr(tax)
-            sms.to = data['phone']
+            sms.to = contact['phone']
             print(sms.to, '\n', sms.message)
             # resp = sms.send()
             # print(resp.text)

+ 2 - 2
winmentor/tax_mailer.py

@@ -57,7 +57,7 @@ class M_mailer(object):
         print(f'period should be "{M_mailer.date}"', end='\n' * 2)
         taxes = []
         for company in mentor_list:
-            for name, data in mail_dict.items():
+            for name, contact in mail_dict.items():
                 # print(company[10].split(sep=',')[1].split(sep=';'))
                 condition = name == company[0]
                 if condition:
@@ -106,5 +106,5 @@ class M_mailer(object):
                                     return_=an_inc, result=result, tax_type=tax_type, period=M_mailer.mentor_date)
                         taxes.append(tax)
                         if send:
-                            yag.send(to=data['mail'], subject='Great!', contents=body)
+                            yag.send(to=contact['mail'], subject='Great!', contents=body)
         return taxes