diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index fbb73c1a12..4b1e449c08 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -336,7 +336,7 @@ part_api_urls = [ url(r'^category/', include(cat_api_urls)), url(r'^star/', include(part_star_api_urls)), - url(r'^(?P\d+)/', PartDetail.as_view(), name='api-part-detail'), + url(r'^(?P\d+)/?', PartDetail.as_view(), name='api-part-detail'), url(r'^.*$', PartList.as_view(), name='api-part-list'), ] @@ -344,7 +344,7 @@ part_api_urls = [ bom_api_urls = [ # BOM Item Detail - url('^(?P\d+)/', BomDetail.as_view(), name='api-bom-detail'), + url(r'^(?P\d+)/?', BomDetail.as_view(), name='api-bom-detail'), # Catch-all url(r'^.*$', BomList.as_view(), name='api-bom-list'), diff --git a/setup.cfg b/setup.cfg index d6e7ca056a..8f2e7d6410 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ ignore = # - W293 - blank lines contain whitespace W293, # - E501 - line too long (82 characters) - E501, + E501, E722 # - C901 - function is too complex C901, exclude = .git,__pycache__,*/migrations/*