mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 05:25:42 +00:00
Send notification if printing fails
If label printing fails (due to a plugin error) then the user is notified.
This commit is contained in:
@ -138,6 +138,9 @@ class LabelPrintMixin:
|
||||
|
||||
"""
|
||||
|
||||
# Label instance
|
||||
label_instance = self.get_object()
|
||||
|
||||
for output in outputs:
|
||||
"""
|
||||
For each output, we generate a temporary image file,
|
||||
@ -156,7 +159,9 @@ class LabelPrintMixin:
|
||||
offload_task(
|
||||
'plugin.events.print_label',
|
||||
plugin.plugin_slug(),
|
||||
image
|
||||
image,
|
||||
label_instance=label_instance,
|
||||
user=request.user,
|
||||
)
|
||||
|
||||
return JsonResponse({
|
||||
|
Reference in New Issue
Block a user