diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-05-17 00:45:22 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-05-17 00:45:22 +0100 |
commit | 77f635378e294cc690f7a580966750b32efe98d2 (patch) | |
tree | 98f197b35101f5475e05d0c4ad25275c7ccede70 | |
parent | 98eb8e031e5082402fd88adf7d67bab910611973 (diff) |
FMB sends external_id as an Open311 attrib
-rwxr-xr-x | bin/send-reports | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/send-reports b/bin/send-reports index 9a70c215b..b7a6b9571 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -342,6 +342,11 @@ while (my $row = $unsent->next) { $row->user->name( $row->user->id . ' ' . $row->user->name ); } + if ($cobrand eq 'fixmybarangay') { + # FixMyBarangay endpoints expect external_id as an attribute + $row->extra( [ { 'name' => 'external_id', 'value' => $row->id } ] ); + } + my $resp = $open311->send_service_request( $row, \%h, $contact->email ); # make sure we don't save user changes from above @@ -349,6 +354,10 @@ while (my $row = $unsent->next) { $row->discard_changes(); } + if ($cobrand eq 'fixmybarangay') { + $row->discard_changes(); + } + if ( $resp ) { $row->external_id( $resp ); $result *= 0; |