Merge pull request #2775 from SchrodingersGat/print-error-tweak

Register notification against the plugin class, not the particular label
This commit is contained in:
Oliver 2022-03-26 11:25:55 +11:00 committed by GitHub
commit 223744eba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,