From 640cf1760ef188d6fa5c39a86d847e68ee5ffb5c Mon Sep 17 00:00:00 2001 From: Michael Volo Date: Wed, 23 Oct 2024 15:59:50 -0600 Subject: [PATCH] use base year from 2 years ago (2023-24 records) (#1588) * use base year from 2 years ago (2023-24 records) * Update update_opportunities.py --- openstax/urls.py | 2 +- salesforce/management/commands/update_opportunities.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openstax/urls.py b/openstax/urls.py index 782c3aa61..124c81516 100644 --- a/openstax/urls.py +++ b/openstax/urls.py @@ -60,6 +60,6 @@ urlpatterns += staticfiles_urlpatterns() urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += [ - path('favicon\.ico', RedirectView.as_view(url=settings.STATIC_URL + 'pages/images/favicon.ico')), + path('favicon.ico', RedirectView.as_view(url=settings.STATIC_URL + 'pages/images/favicon.ico')), path('__debug__/', include('debug_toolbar.urls')) ] diff --git a/salesforce/management/commands/update_opportunities.py b/salesforce/management/commands/update_opportunities.py index 5b92b2b1d..d888759ee 100644 --- a/salesforce/management/commands/update_opportunities.py +++ b/salesforce/management/commands/update_opportunities.py @@ -13,6 +13,8 @@ def handle(self, *args, **options): base_year = now.year if now.month < 7: # if it's before July, the base year is the previous year (4/1/2024 = base_year 2023) + base_year -= 2 + else: base_year -= 1 # TODO: I don't think this is needed - updating the records should be fine, and keeps something on the form