mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-12 07:48:41 -05:00
Adds Inventory labels (#11558)
* Adds inventory labels end point * Adds label field to inventory form
This commit is contained in:
+6
-1
@@ -853,7 +853,12 @@ class InventoryAccess(BaseAccess):
|
||||
"""
|
||||
|
||||
model = Inventory
|
||||
prefetch_related = ('created_by', 'modified_by', 'organization')
|
||||
prefetch_related = (
|
||||
'created_by',
|
||||
'modified_by',
|
||||
'organization',
|
||||
Prefetch('labels', queryset=Label.objects.all().order_by('name')),
|
||||
)
|
||||
|
||||
def filtered_queryset(self, allowed=None, ad_hoc=None):
|
||||
return self.model.accessible_objects(self.user, 'read_role')
|
||||
|
||||
Reference in New Issue
Block a user