From 157c891cde0a8c430910407f17cd297d2f6a52fb Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 29 Jul 2026 11:28:55 +0200 Subject: [PATCH] fix: restore license expiration email delivery --- CHANGELOG.md | 1 + netbox_slm/__init__.py | 2 +- netbox_slm/jobs.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bad843f..703c00f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Make the required single platform destination explicit when creating an installation * Fix installation form submission on NetBox v4.6.5 when form mixins return no cleaned-data value +* Prevent the notification log creation flag from shadowing Django's translation function during email delivery ### Added diff --git a/netbox_slm/__init__.py b/netbox_slm/__init__.py index 6fa668e..768d451 100644 --- a/netbox_slm/__init__.py +++ b/netbox_slm/__init__.py @@ -17,7 +17,7 @@ limitations under the License. from netbox.plugins import PluginConfig from django.utils.translation import gettext_lazy as _ -__version__ = "1.12.1" +__version__ = "1.12.2" class SLMConfig(PluginConfig): diff --git a/netbox_slm/jobs.py b/netbox_slm/jobs.py index d28793c..940b1e9 100644 --- a/netbox_slm/jobs.py +++ b/netbox_slm/jobs.py @@ -39,12 +39,12 @@ class LicenseExpirationNotificationJob(JobRunner): self._notify(license, user, max(due_dates)) def _notify(self, license, user, notification_date): - log, _ = SoftwareLicenseNotificationLog.objects.get_or_create( + log = SoftwareLicenseNotificationLog.objects.get_or_create( license=license, user=user, expiration_date=license.expiration_date, notification_date=notification_date, - ) + )[0] now = timezone.now() if log.netbox_sent_at is None: