aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-15 16:44:39 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-15 16:44:39 +0000
commiteb4868613c063937d7a8fee958c92b33e2adbae4 (patch)
tree856d33b234395a2740e78c94d363aeab602ad56a
parent69bcc1d99421a333a0ac8e764b1d259ffe24e5a3 (diff)
Reset external_body (for case where Zurich assigns to external, then takes it back and assigns internally).
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index b6e582dc2..8082697bc 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -201,11 +201,13 @@ sub admin_report_edit {
if ( $new_cat && $new_cat ne $problem->category ) {
my $cat = $c->model('DB::Contact')->search( { category => $c->req->params->{category} } )->first;
$problem->category( $new_cat );
+ $problem->external_body( undef );
$problem->bodies_str( $cat->body_id );
$problem->whensent( undef );
$redirect = 1 if $cat->body_id ne $body->id;
} elsif ( my $subdiv = $c->req->params->{body_subdivision} ) {
$problem->state( 'in progress' );
+ $problem->external_body( undef );
$problem->bodies_str( $subdiv );
$problem->whensent( undef );
$redirect = 1;