1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-23 18:50:22 +03:00

Improved services usage retrieval

This commit is contained in:
Adolfo Gómez García 2020-10-20 11:10:02 +02:00
parent 9c991fd8ef
commit 61750f2f94

View File

@ -101,7 +101,8 @@ class ServicesUsage(DetailHandler):
userServicesQuery = UserService.objects.filter(deployed_service__service_uuid=processUuid(item))
return [ServicesUsage.itemToDict(k) for k in userServicesQuery.filter(state=State.USABLE).order_by('creation_date').
prefetch_related('deployed_service').prefetch_related('deployed_service__service').prefetch_related('properties')]
prefetch_related('deployed_service').prefetch_related('deployed_service__service').prefetch_related('properties').
prefetch_related('user').prefetch_related('user__manager')]
except Exception:
logger.exception('getItems')