aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/send-reports9
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;