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

    
https://github.com/apache/incubator-trafficcontrol/pull/434#discussion_r110308370
  
    --- Diff: traffic_ops/app/lib/API/User.pm ---
    @@ -281,11 +284,14 @@ sub current {
     
        if ( &is_ldap($self) ) {
                my $role = $self->db->resultset('Role')->search( { name => 
"read-only" } )->get_column('id')->single;
    +           my $user_tenant_id = $self->current_user_tenant();
    +           my $user_tenant = defined($user_tenant_id) ? 
$self->db->resultset('Tenant')->search( { id => $user_tenant_id } 
)->get_column('name')->single : "N/A";
    --- End diff --
    
    make sure you have a prefetch if you are going to call $row->tenant->name
    
    so you have to make sure the tmsuer query is joined to the tenant table 
using a prefetch


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