Github user mitchell852 commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafficcontrol/pull/433#discussion_r110311677
  
    --- Diff: traffic_ops/app/lib/API/Tenant.pm ---
    @@ -44,14 +44,16 @@ sub index {
        my $orderby = $self->param('orderby') || "name";
        my $rs_data = $self->db->resultset("Tenant")->search( undef, {order_by 
=> 'me.' . $orderby } );
    --- End diff --
    
    maybe you can just make this query smarter like
    
    my $rs_data = $self->db->resultset("Tenant")->search( {-in 
(my-list-of-tenants)}, {order_by => 'me.' . $orderby } );
    
    ^^ I can't remember the dbix syntax for that off the top of my head but 
basically a dbix query that looks like:
    
    select * from tenant where id in (a list of the user's tenant plus it's 
children)
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to