From 33aacad9fe38daa849310ad811c54c473d2b553f Mon Sep 17 00:00:00 2001 From: gzbender Date: Wed, 10 Jul 2019 15:22:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B5=20=D0=BE=D1=82=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=D0=B8=D1=81=D1=8C=20=D0=B3=D1=80=D0=B0=D0=BC?= =?UTF-8?q?=D0=BE=D1=82=D1=8B=20=D0=B7=D0=B0=20=D1=80=D0=B8=D1=81=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=BB=D0=B0=D0=B3?= =?UTF-8?q?=D0=B5=D1=80=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/notification/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/notification/tasks.py b/apps/notification/tasks.py index 72a02db1..0d06b07c 100644 --- a/apps/notification/tasks.py +++ b/apps/notification/tasks.py @@ -240,6 +240,7 @@ def send_camp_certificates(email=None, dry_run=False, certificate_number=None): f.close() if un.user.child_filled: for fn in file_names: - os.remove(fn) + if os.path.isfile(fn): + os.remove(fn) un.camp_certificate_last_email = date_end un.save()