aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/User.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/User.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/User.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm
index 9554bbe7e..4f46fcfe2 100644
--- a/perllib/FixMyStreet/DB/Result/User.pm
+++ b/perllib/FixMyStreet/DB/Result/User.pm
@@ -449,8 +449,8 @@ sub has_permission_to {
return 0 unless $available{$permission_type};
return 1 if $self->is_superuser;
- return 0 if !$body_ids || (ref $body_ids && !@$body_ids);
- $body_ids = [ $body_ids ] unless ref $body_ids;
+ return 0 if !$body_ids || (ref $body_ids eq 'ARRAY' && !@$body_ids);
+ $body_ids = [ $body_ids ] unless ref $body_ids eq 'ARRAY';
my %body_ids = map { $_ => 1 } @$body_ids;
foreach (@{$self->body_permissions}) {