Skip to content

Commit

Permalink
base year cutoff june 30
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo committed Oct 18, 2024
1 parent 5c216b8 commit d05cd3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions salesforce/management/commands/update_opportunities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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'],
Expand Down

0 comments on commit d05cd3c

Please sign in to comment.