aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index a1258ccaa..ec8df4450 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -399,10 +399,13 @@ sub _geocode : Private {
sub lookup_by_ref : Private {
my ( $self, $c, $ref ) = @_;
- my $problems = $c->cobrand->problems->search([
- id => $ref,
- external_id => $ref
- ]);
+ my $criteria = $c->cobrand->call_hook("lookup_by_ref", $ref) ||
+ [
+ id => $ref,
+ external_id => $ref
+ ];
+
+ my $problems = $c->cobrand->problems->search( $criteria );
my $count = try {
$problems->count;