Style fixes

This commit is contained in:
Oliver Walters 2017-04-14 13:31:07 +10:00
parent 15d27cafec
commit f21a05dfa3
3 changed files with 3 additions and 2 deletions

View File

@ -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:

View File

@ -29,7 +29,7 @@ projectcategorypatterns = [
urlpatterns = [
# Individual project URL
url(r'^(?P<pk>[0-9]+)/?$', include(projectdetailpatterns)),
url(r'^(?P<pk>[0-9]+)/?', include(projectdetailpatterns)),
# List of all projects
url(r'^$', views.ProjectList.as_view()),

View File

@ -21,6 +21,7 @@ class StockFilter(django_filters.rest_framework.FilterSet):
model = StockItem
fields = ['quantity']
class StockList(generics.ListCreateAPIView):
serializer_class = StockItemSerializer