2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-12 07:54:14 +00:00

"URL" is renamed to "link" in the URL

This commit is contained in:
Oliver Walters
2020-04-05 19:18:32 +10:00
parent 511cdef323
commit d739c2dea8
2 changed files with 8 additions and 1 deletions

View File

@ -243,6 +243,12 @@ class PartList(generics.ListCreateAPIView):
else:
item['category__name'] = None
# Rename "URL" to "link" to distinguish from lower-case "url",
# which is the web address of the item itself
if 'URL' in item.keys():
item['link'] = item['URL']
del item['URL']
return Response(data)
def get_queryset(self):