File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -366,11 +366,12 @@ def get_queryset(self):
366
366
Q (resourceattribute__value = data .get ('vendor' ))
367
367
)
368
368
project_title_list = [project .title for project in project_list ]
369
- owned_resources = [attribute .resource .pk for attribute in ResourceAttribute .objects .filter (
369
+ not_owned_compute_nodes = [attribute .resource .pk for attribute in ResourceAttribute .objects .filter (
370
370
resource_attribute_type__name = 'Owner' ,
371
- value__in = project_title_list
372
- )]
373
- return resources .filter (Q (allowed_users = self .request .user ) | Q (pk__in = owned_resources )).distinct ()
371
+ resource__resource_type__name = 'Compute Node'
372
+ ).exclude (value__in = project_title_list )]
373
+ return resources .exclude (pk__in = not_owned_compute_nodes ).distinct ()
374
+
374
375
375
376
def get_context_data (self , ** kwargs ):
376
377
context = super ().get_context_data (
You can’t perform that action at this time.
0 commit comments