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

[PUI] Tweaks (#6516)

* Enable editing "part" in PartTestTemplate

* Hide part if user is not staff

* API: allow filtering of templates by key

* Update API docs
This commit is contained in:
Oliver
2024-02-19 17:05:36 +11:00
committed by GitHub
parent 3b11a01966
commit 3a52a1631d
4 changed files with 17 additions and 4 deletions

View File

@@ -1,11 +1,14 @@
"""InvenTree API version information."""
# InvenTree API version
INVENTREE_API_VERSION = 170
INVENTREE_API_VERSION = 171
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """
v171 - 2024-02-19 : https://github.com/inventree/InvenTree/pull/6516
- Adds "key" as a filterable parameter to PartTestTemplate list endpoint
v170 -> 2024-02-19 : https://github.com/inventree/InvenTree/pull/6514
- Adds "has_results" filter to the PartTestTemplate list endpoint

View File

@@ -375,7 +375,7 @@ class PartTestTemplateFilter(rest_filters.FilterSet):
"""Metaclass options for this filterset."""
model = PartTestTemplate
fields = ['required', 'requires_value', 'requires_attachment']
fields = ['required', 'requires_value', 'requires_attachment', 'key']
part = rest_filters.ModelChoiceFilter(
queryset=Part.objects.filter(trackable=True),