2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-13 04:57:33 +00:00

[API] Role fix (#11932)

- Allow users to view BOM validation information with bom.view role
This commit is contained in:
Oliver
2026-05-12 14:39:40 +10:00
committed by GitHub
parent 34a9f1e10c
commit 5d72eb4f1d
+2 -2
View File
@@ -599,7 +599,7 @@ class PartValidateBOM(RetrieveUpdateAPI):
queryset = Part.objects.all() queryset = Part.objects.all()
serializer_class = part_serializers.PartBomValidateSerializer serializer_class = part_serializers.PartBomValidateSerializer
role_required = 'bom.change' role_required = 'bom'
@extend_schema( @extend_schema(
responses={ responses={
@@ -610,7 +610,7 @@ class PartValidateBOM(RetrieveUpdateAPI):
def update(self, request, *args, **kwargs): def update(self, request, *args, **kwargs):
"""Validate the referenced BomItem instance. """Validate the referenced BomItem instance.
As this task if offloaded to the background worker, As this task is offloaded to the background worker,
we return information about the background task which is performing the validation. we return information about the background task which is performing the validation.
""" """
part = self.get_object() part = self.get_object()