fix: restore license expiration email delivery

This commit is contained in:
2026-07-29 11:28:55 +02:00
parent 3599dc703e
commit 157c891cde
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -6,6 +6,7 @@
* Make the required single platform destination explicit when creating an installation * 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 * 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 ### Added
+1 -1
View File
@@ -17,7 +17,7 @@ limitations under the License.
from netbox.plugins import PluginConfig from netbox.plugins import PluginConfig
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
__version__ = "1.12.1" __version__ = "1.12.2"
class SLMConfig(PluginConfig): class SLMConfig(PluginConfig):
+2 -2
View File
@@ -39,12 +39,12 @@ class LicenseExpirationNotificationJob(JobRunner):
self._notify(license, user, max(due_dates)) self._notify(license, user, max(due_dates))
def _notify(self, license, user, notification_date): def _notify(self, license, user, notification_date):
log, _ = SoftwareLicenseNotificationLog.objects.get_or_create( log = SoftwareLicenseNotificationLog.objects.get_or_create(
license=license, license=license,
user=user, user=user,
expiration_date=license.expiration_date, expiration_date=license.expiration_date,
notification_date=notification_date, notification_date=notification_date,
) )[0]
now = timezone.now() now = timezone.now()
if log.netbox_sent_at is None: if log.netbox_sent_at is None: