agendas: filter exception sources with really no associated file (#41331)

This commit is contained in:
Serghei Mihai 2020-04-04 15:25:11 +02:00
parent 5980720ec2
commit fbd7720fa6
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class Command(BaseCommand):
help = 'Synchronize time period exceptions from desks remote ics'
def handle(self, **options):
for source in TimePeriodExceptionSource.objects.filter(ics_url__isnull=False, ics_file=''):
for source in TimePeriodExceptionSource.objects.filter(Q(ics_file='') | Q(ics_file__isnull=True), ics_url__isnull=False):
try:
source.desk.import_timeperiod_exceptions_from_remote_ics(source.ics_url, source=source)
except ICSError as e: