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

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

No files matched your search

+6
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):