remotes/origin/feature/LIL-711
gzbender 7 years ago
parent 6cc64636be
commit a034eef739
  1. 18
      apps/notification/migrations/0002_usernotification_certificate_on_date.py
  2. 1
      apps/notification/models.py
  3. 1
      apps/notification/tasks.py

@ -0,0 +1,18 @@
# Generated by Django 2.0.7 on 2018-12-06 09:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notification', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='usernotification',
name='certificate_on_date',
field=models.DateField(blank=True, null=True),
),
]

@ -9,3 +9,4 @@ class UserNotification(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
certificate_number = models.SmallIntegerField(blank=True, null=True)
certificate_last_email = models.DateTimeField(blank=True, null=True)
certificate_on_date = models.DateField(blank=True, null=True)

@ -62,6 +62,7 @@ def send_certificates(email=None, date=None, dry_run=False):
finally:
file.close()
un.certificate_last_email = now()
un.certificate_on_date = date
un.save()

Loading…
Cancel
Save