diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-06-15 12:43:54 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-06-15 13:47:53 +0100 |
commit | 8d428f9c8fd9e25821560a20d00d444d9fb67e08 (patch) | |
tree | 52b75a1f922b589a151acccc0ee38c2ac9a90f59 /perllib/Open311/GetServiceRequestUpdates.pm | |
parent | 96c72fa72e547a2ce5b435db3cae8c3c45efafc1 (diff) |
Tidy up Open311 XML handling.
Parse the XML in such a way other parts of the code do not have to worry
about single-value folding or the like.
Diffstat (limited to 'perllib/Open311/GetServiceRequestUpdates.pm')
-rw-r--r-- | perllib/Open311/GetServiceRequestUpdates.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index daa5fb64d..921b2996d 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -122,8 +122,7 @@ sub update_comments { } ); - # ref test as XML::Simple will have returned an empty hashref for empty element - if ($request->{media_url} && !ref $request->{media_url}) { + if ($request->{media_url}) { my $ua = LWP::UserAgent->new; my $res = $ua->get($request->{media_url}); if ( $res->is_success && $res->content_type eq 'image/jpeg' ) { |