From 92f5648656945d20e7bc5509b2098e18ca24236a Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 3 Apr 2020 12:20:43 +1100 Subject: [PATCH] Fix API endpoints for Stock app --- InvenTree/stock/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index cda1034f4d..3eb183ce35 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -545,13 +545,13 @@ stock_endpoints = [ ] location_endpoints = [ - url(r'^$', LocationDetail.as_view(), name='api-location-detail'), + url(r'^(?P\d+)/', LocationDetail.as_view(), name='api-location-detail'), + + url(r'^.*$', StockLocationList.as_view(), name='api-location-list'), ] stock_api_urls = [ - url(r'location/?', StockLocationList.as_view(), name='api-location-list'), - - url(r'location/(?P\d+)/', include(location_endpoints)), + url(r'location/', include(location_endpoints)), # These JSON endpoints have been replaced (for now) with server-side form rendering - 02/06/2019 # url(r'stocktake/?', StockStocktake.as_view(), name='api-stock-stocktake'),