Projet

Général

Profil

0001-agendas-filter-exception-sources-with-really-no-asso.patch

Serghei Mihai, 04 avril 2020 16:01

Télécharger (1,24 ko)

Voir les différences:

Subject: [PATCH] agendas: filter exception sources with really no associated
 file (#41331)

 .../management/commands/sync_desks_timeperiod_exceptions.py     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
chrono/agendas/management/commands/sync_desks_timeperiod_exceptions.py
28 28
    help = 'Synchronize time period exceptions from desks remote ics'
29 29

  
30 30
    def handle(self, **options):
31
        for source in TimePeriodExceptionSource.objects.filter(ics_url__isnull=False, ics_file=''):
31
        for source in TimePeriodExceptionSource.objects.filter(Q(ics_file='') | Q(ics_file__isnull=True), ics_url__isnull=False):
32 32
            try:
33 33
                source.desk.import_timeperiod_exceptions_from_remote_ics(source.ics_url, source=source)
34 34
            except ICSError as e:
35
-