From d05cd3c3f9e4087f0c737f8d78fa4235939744f6 Mon Sep 17 00:00:00 2001 From: Michael Volo Date: Fri, 18 Oct 2024 13:13:04 -0500 Subject: [PATCH] base year cutoff june 30 --- salesforce/management/commands/update_opportunities.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/salesforce/management/commands/update_opportunities.py b/salesforce/management/commands/update_opportunities.py index aa429ff2..ff2d89e0 100644 --- a/salesforce/management/commands/update_opportunities.py +++ b/salesforce/management/commands/update_opportunities.py @@ -12,7 +12,7 @@ def handle(self, *args, **options): now = datetime.datetime.now() year = now.year - if now.month > 7: # Salesforce needs the school base year, this is how they calculate it + if now.month >= 7: # Salesforce needs the school base year, this is how they calculate it year = year - 1 @@ -39,7 +39,6 @@ def handle(self, *args, **options): response = sf.query(query) records = response['records'] - num_created = 0 for record in records: opportunity, created = AdoptionOpportunityRecord.objects.update_or_create( opportunity_id=record['Id'],