From 3e484317d2d781dcf15a300fa34ce8843c9d10a3 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 25 Mar 2022 23:49:15 +1100 Subject: [PATCH] Register notification against the plugin class, not the particular label --- InvenTree/plugin/events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/plugin/events.py b/InvenTree/plugin/events.py index ac0eaf3914..cc0e7539b9 100644 --- a/InvenTree/plugin/events.py +++ b/InvenTree/plugin/events.py @@ -228,8 +228,9 @@ def print_label(plugin_slug, label_image, label_instance=None, user=None): logger.error(f"Label printing failed: Sending notification to user '{user}'") + # Throw an error against the plugin instance common.notifications.trigger_notifaction( - label_instance, + plugin.plugin_config(), 'label.printing_failed', targets=[user], context=ctx,