- my $ref = DXUser->get_current($_[4]);
- if ($ref) {
- $loc = $ref->qra || '' if $self->{user}->wantgrid;
- $loc = ' ' . substr($loc, 0, 4) if $loc;
- }
- $loc = "" unless $loc;
+ if ($self->{user}->wantgrid) {
+ my $ref = DXUser->get_current($_[4]);
+ if ($ref) {
+ $loc = $ref->qra || '';
+ $loc = ' ' . substr($loc, 0, 4) if $loc;
+ }
+ }