From 8b2de20d1cd64f1a6e443e34ffdae2b1e483d701 Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Tue, 5 Nov 2019 17:20:37 +0000
Subject: [PATCH] fixup! Add basic management command to trigger reminders
 about reports

---
 .../apply/projects/management/commands/notify_report_due.py   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/opentech/apply/projects/management/commands/notify_report_due.py b/opentech/apply/projects/management/commands/notify_report_due.py
index a74e3c572..242eb3bcd 100644
--- a/opentech/apply/projects/management/commands/notify_report_due.py
+++ b/opentech/apply/projects/management/commands/notify_report_due.py
@@ -15,7 +15,7 @@ class Command(BaseCommand):
     help = 'Notify users that they have a report due soon'
 
     def add_arguments(self, parser):
-        parser.add_argument('days', type=int)
+        parser.add_argument('days_before', type=int)
 
     def handle(self, *args, **options):
         site = ApplyHomePage.objects.first().get_site()
@@ -30,7 +30,7 @@ class Command(BaseCommand):
         request._messages = FallbackStorage(request)
 
         today = timezone.now().date()
-        due_date = today + relativedelta(days=options['days'])
+        due_date = today + relativedelta(days=options['days_before'])
         for project in Project.objects.in_progress():
             next_report = project.report_config.current_due_report()
             due_soon = next_report.end_date == due_date
-- 
GitLab