From 74a80c215ef7cef66857774b3309ab3844fc2346 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 7 Jan 2025 17:56:36 +0100 Subject: [PATCH] :sparkles: CHANGE use configurable of press throught days - make it work --- .../commands/send_email_to_users_about_doordrukken.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sdg/producten/management/commands/send_email_to_users_about_doordrukken.py b/src/sdg/producten/management/commands/send_email_to_users_about_doordrukken.py index e18632188..165bfdcec 100644 --- a/src/sdg/producten/management/commands/send_email_to_users_about_doordrukken.py +++ b/src/sdg/producten/management/commands/send_email_to_users_about_doordrukken.py @@ -79,7 +79,7 @@ def create_and_send_mail( ) send_mail( - "30 dagen tot een product in SDG automatisch zal worden gepubliceerd.", + f"{settings.SDG_PRESS_THROUGH_DAYS} dagen tot een product in SDG automatisch zal worden gepubliceerd.", strip_tags(html_message), settings.DEFAULT_FROM_EMAIL, [user.email], @@ -91,7 +91,8 @@ def handle(self, *args, **options): for product in Product.objects.filter( referentie_product__isnull=False, automatisch_doordrukken=True, - automatisch_doordrukken_datum=date.today() + timedelta(days=30), + automatisch_doordrukken_datum=date.today() + + timedelta(days=settings.SDG_PRESS_THROUGH_DAYS), ): catalogus: ProductenCatalogus = product.catalogus lokale_overheid: LokaleOverheid = catalogus.lokale_overheid