mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Allow label printing when custom plugins not enabled (#5266)
- Will still allow "builtin" plugins to function
This commit is contained in:
parent
5862c70b24
commit
7a8e59305f
@ -1,6 +1,5 @@
|
|||||||
"""API functionality for the 'label' app"""
|
"""API functionality for the 'label' app"""
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
from django.core.exceptions import FieldError, ValidationError
|
from django.core.exceptions import FieldError, ValidationError
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
from django.urls import include, path, re_path
|
from django.urls import include, path, re_path
|
||||||
@ -161,9 +160,6 @@ class LabelPrintMixin(LabelFilterMixin):
|
|||||||
- matching plugin implements the 'labels' mixin
|
- matching plugin implements the 'labels' mixin
|
||||||
- matching plugin is enabled
|
- matching plugin is enabled
|
||||||
"""
|
"""
|
||||||
if not settings.PLUGINS_ENABLED:
|
|
||||||
return None # pragma: no cover
|
|
||||||
|
|
||||||
plugin_key = request.query_params.get('plugin', None)
|
plugin_key = request.query_params.get('plugin', None)
|
||||||
|
|
||||||
# No plugin provided!
|
# No plugin provided!
|
||||||
|
Loading…
Reference in New Issue
Block a user