diff --git a/InvenTree/InvenTree/models.py b/InvenTree/InvenTree/models.py index 70065edfc6..e8430694d0 100644 --- a/InvenTree/InvenTree/models.py +++ b/InvenTree/InvenTree/models.py @@ -184,7 +184,7 @@ def FilterChildren(queryset, parent): if not parent: return queryset - elif isinstance(parent,str) and parent.lower() in ['none', 'false', 'null', 'top', '0']: + elif isinstance(parent, str) and parent.lower() in ['none', 'false', 'null', 'top', '0']: return queryset.filter(parent=None) else: try: diff --git a/InvenTree/project/urls.py b/InvenTree/project/urls.py index 27f7fed78b..d0f50bac56 100644 --- a/InvenTree/project/urls.py +++ b/InvenTree/project/urls.py @@ -29,7 +29,7 @@ projectcategorypatterns = [ urlpatterns = [ # Individual project URL - url(r'^(?P[0-9]+)/?$', include(projectdetailpatterns)), + url(r'^(?P[0-9]+)/?', include(projectdetailpatterns)), # List of all projects url(r'^$', views.ProjectList.as_view()), diff --git a/InvenTree/stock/views.py b/InvenTree/stock/views.py index 12de5ac8d2..96ffd8633c 100644 --- a/InvenTree/stock/views.py +++ b/InvenTree/stock/views.py @@ -21,6 +21,7 @@ class StockFilter(django_filters.rest_framework.FilterSet): model = StockItem fields = ['quantity'] + class StockList(generics.ListCreateAPIView): serializer_class = StockItemSerializer