diff options
-rw-r--r-- | db/schema_0001-add_sessions_and_users_and_dbic_fields.sql | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/EmptyHomes.pm | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/db/schema_0001-add_sessions_and_users_and_dbic_fields.sql b/db/schema_0001-add_sessions_and_users_and_dbic_fields.sql index 581741fe8..b22ab7dfe 100644 --- a/db/schema_0001-add_sessions_and_users_and_dbic_fields.sql +++ b/db/schema_0001-add_sessions_and_users_and_dbic_fields.sql @@ -33,6 +33,9 @@ update contacts_history and contacts_history.area_id = contacts.area_id ); +-- Note any categories that have been deleted will cause the following +-- line to fail, and they'll need to be deleted manually first. + AlTER TABLE contacts_history alter COLUMN contact_id SET NOT NULL; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 332a0052d..249027c5c 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -829,11 +829,10 @@ sub reports_council_check { my $council = mySociety::MaPit::call( 'area', $area->{parent_area} ); $c->stash->{ward} = $area; $c->stash->{council} = $council; - $c->detach( 'redirect_ward' ); } else { $c->stash->{council} = $area; - $c->detach( 'redirect_council' ); } + $c->detach( 'redirect_area' ); } } diff --git a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm index 2199d660e..4a93bcb20 100644 --- a/perllib/FixMyStreet/Cobrand/EmptyHomes.pm +++ b/perllib/FixMyStreet/Cobrand/EmptyHomes.pm @@ -148,9 +148,9 @@ sub council_rss_alert_options { foreach (values %$all_councils) { $_->{short_name} = $self->short_name( $_ ); ( $_->{id_name} = $_->{short_name} ) =~ tr/+/_/; - if ($_->{type} eq 'DIS') { + if ($councils{$_->{type}}) { $council = $_; - } elsif ($_->{type} eq 'DIW') { + } else { $ward = $_; } } |