2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-09 07:00:56 +00:00

Adds extra subsctiption functionality for Part and PartCategory

- Allows variants and templates
- Allows categories and sub-categories
- Unit testing
This commit is contained in:
Oliver
2021-11-03 22:57:49 +11:00
parent cf023e2cc1
commit f9a00b7a90
4 changed files with 224 additions and 22 deletions

View File

@ -420,7 +420,7 @@ class PartDetail(generics.RetrieveUpdateDestroyAPIView):
if 'starred' in request.data:
starred = str2bool(request.data.get('starred', None))
self.get_object().setStarred(request.user, starred)
self.get_object().set_subscription(request.user, starred)
response = super().update(request, *args, **kwargs)