diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index d5e039ca77..4cecd12f17 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -371,7 +371,6 @@ class Part(MPTTModel): } } - def get_context_data(self, request, **kwargs): """ Return some useful context data about this part for template rendering diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index ce5e902cff..b11f556e34 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -351,7 +351,7 @@ class StockLocationList(generics.ListCreateAPIView): loc = StockLocation.objects.get(pk=exclude_tree) queryset = queryset.exclude( - pk__in=[l.pk for l in loc.get_descendants(include_self=True)] + pk__in=[subloc.pk for subloc in loc.get_descendants(include_self=True)] ) except (ValueError, StockLocation.DoesNotExist):