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

Rename Part.URL -> part.link

- Previous migration needed some tweaking to get it to run... because.. why?
- It seems to pass when running manage.py migrate but fails when running manage.py test
- Stumped on this one
This commit is contained in:
Oliver Walters
2020-04-06 11:16:39 +10:00
parent bd407cd226
commit b28487760a
10 changed files with 39 additions and 24 deletions

View File

@ -200,7 +200,7 @@ class PartList(generics.ListCreateAPIView):
'description',
'keywords',
'is_template',
'URL',
'link',
'units',
'minimum_stock',
'trackable',
@ -249,12 +249,6 @@ 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):