Exemplo n.º 1
0
 def read_vacation(self):
     mail_vaca = Email.EmailVacation(self._db)
     for row in mail_vaca.list_email_active_vacations():
         t_id = int(row['target_id'])
         insert = False
         if t_id in self.targ2vacation:
             if row['start_date'] > self.targ2vacation[t_id][1]:
                 insert = True
         else:
             insert = True
         if insert:
             self.targ2vacation[t_id] = (iso2utf(row['vacation_text']),
                                         row['start_date'], row['end_date'])
Exemplo n.º 2
0
 def read_vacation(self):
     mail_vaca = Email.EmailVacation(self._db)
     for row in mail_vaca.list_email_active_vacations():
         t_id = int(row['target_id'])
         # exchange-relatert-jazz
         # if the target is recorded as having spread_exchange_acc
         # the whole row is skipped because we don't want to
         # export vacation messages for such targets to LDAP
         if t_id in self.targ2spread:
             continue
         insert = False
         if t_id in self.targ2vacation:
             if row['start_date'] > self.targ2vacation[t_id][1]:
                 insert = True
         else:
             insert = True
         if insert:
             self.targ2vacation[t_id] = (iso2utf(row['vacation_text']),
                                         row['start_date'], row['end_date'])