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

    
https://github.com/apache/incubator-trafficcontrol/pull/434#discussion_r110539766
  
    --- Diff: traffic_ops/app/lib/API/User.pm ---
    @@ -69,7 +69,7 @@ sub index {
     
        my $dbh;
        if ( defined $username ) {
    -           $dbh = $self->db->resultset("TmUser")->search( { username => 
$username }, { prefetch => [ { 'role' => undef } ], order_by => 'me.' . 
$orderby } );
    +           $dbh = $self->db->resultset("TmUser")->search( { username => 
$username }, { prefetch => [ { 'role' => undef }, 'tenant' ], order_by => 'me.' 
. $orderby } );
    --- End diff --
    
    Will change, I was not sure why it used the  { 'role' => undef } in the 
first place so I kept it.
    The weird thing is that I have changed the wrong line, I should have 
changed the line in the "else" clause as $username is not defined when calling 
/users route.  But, it still works without prefetch on the tenant.  not sure 
how. 


---
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