aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-02-23 10:44:04 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-02-23 10:44:04 +0000
commit3f3ec1e1d2dc18b94248121d4f7d4e2b39718978 (patch)
treebf2d7c0c43e6c9f9e200fd7b47b16dbc115fa9db
parent63f4c86f68d9be39275c3081306736c77da4cb40 (diff)
Fix nearby photo handling for #227.
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Nearby.pm2
-rw-r--r--templates/web/fixmystreet/around/around_map_list_items.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
index 4b37e7731..83fc85a88 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Nearby.pm
@@ -24,7 +24,7 @@ sub nearby {
columns => [
'problem.id', 'problem.title', 'problem.latitude',
'problem.longitude', 'distance', 'problem.state',
- 'problem.confirmed', { photo => 'photo is not null' },
+ 'problem.confirmed', { 'problem.photo' => 'problem.photo is not null' },
],
bind => [ $mid_lat, $mid_lon, $dist ],
order_by => [ 'distance', { -desc => 'created' } ],
diff --git a/templates/web/fixmystreet/around/around_map_list_items.html b/templates/web/fixmystreet/around/around_map_list_items.html
index 49a7798c3..86370017f 100644
--- a/templates/web/fixmystreet/around/around_map_list_items.html
+++ b/templates/web/fixmystreet/around/around_map_list_items.html
@@ -14,7 +14,7 @@
</div>
[% IF p.problem.photo %]
<div class="img">
- <img height="60" width="90" src="/photo?id=[% p.id %];fp=1" alt="">
+ <img height="60" width="90" src="/photo?id=[% p.problem.id %];fp=1" alt="">
</div>
[% END %]
</a>