From 394b93cc7460626f0e9297c496f64745c00aa7da Mon Sep 17 00:00:00 2001 From: Michael Volo Date: Wed, 23 Oct 2024 15:22:25 -0500 Subject: [PATCH 1/2] use base year from 2 years ago (2023-24 records) --- openstax/urls.py | 2 +- salesforce/management/commands/update_opportunities.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..ed033ca45 100644 --- a/salesforce/management/commands/update_opportunities.py +++ b/salesforce/management/commands/update_opportunities.py @@ -13,7 +13,7 @@ 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 -= 1 + base_year -= 2 # TODO: I don't think this is needed - updating the records should be fine, and keeps something on the form # TODO: for the user. Eventually, this should update CMS DB with updated data if they fill out the form From 3121e2dc662b0f1b08a1a5bd6d91037972241198 Mon Sep 17 00:00:00 2001 From: Michael Volo Date: Wed, 23 Oct 2024 16:49:07 -0500 Subject: [PATCH 2/2] Update update_opportunities.py --- salesforce/management/commands/update_opportunities.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/salesforce/management/commands/update_opportunities.py b/salesforce/management/commands/update_opportunities.py index ed033ca45..d888759ee 100644 --- a/salesforce/management/commands/update_opportunities.py +++ b/salesforce/management/commands/update_opportunities.py @@ -14,6 +14,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 # TODO: for the user. Eventually, this should update CMS DB with updated data if they fill out the form