From 9cf372f633d7be143e4a70da516d4018101599ff Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 21 Jul 2021 21:24:18 +1000 Subject: [PATCH] PEP fixes --- InvenTree/part/models.py | 1 - InvenTree/stock/api.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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):