chore: Improve n+1 queries (#4202)
Fixes the n+1 queries that get triggered while accessing agents endpoint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
json.id resource.id
|
||||
# could be nil for a deleted agent hence the safe operator before account id
|
||||
json.account_id resource.account&.id
|
||||
json.account_id Current.account&.id
|
||||
json.availability_status resource.availability_status
|
||||
json.auto_offline resource.auto_offline
|
||||
json.confirmed resource.confirmed?
|
||||
|
||||
Reference in New Issue
Block a user