aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin/DefectTypes.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin/Users.pm4
4 files changed, 5 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index d0d84ff70..5f18f8557 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -831,7 +831,7 @@ sub template_edit : Path('templates') : Args(2) {
$template->update_or_insert;
$template->contact_response_templates->search({
- contact_id => { '!=' => \@new_contact_ids },
+ contact_id => { -not_in => \@new_contact_ids },
})->delete;
foreach my $contact_id (@new_contact_ids) {
$template->contact_response_templates->find_or_create({
diff --git a/perllib/FixMyStreet/App/Controller/Admin/DefectTypes.pm b/perllib/FixMyStreet/App/Controller/Admin/DefectTypes.pm
index ed9b40fd0..6c1a25e5a 100644
--- a/perllib/FixMyStreet/App/Controller/Admin/DefectTypes.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin/DefectTypes.pm
@@ -76,7 +76,7 @@ sub edit : Path : Args(2) {
my @new_contact_ids = $c->get_param_list('categories');
@new_contact_ids = @{ mySociety::ArrayUtils::intersection(\@live_contact_ids, \@new_contact_ids) };
$defect_type->contact_defect_types->search({
- contact_id => { '!=' => \@new_contact_ids },
+ contact_id => { -not_in => \@new_contact_ids },
})->delete;
foreach my $contact_id (@new_contact_ids) {
$defect_type->contact_defect_types->find_or_create({
diff --git a/perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm b/perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm
index 2613f6ae0..5077fe78f 100644
--- a/perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin/ResponsePriorities.pm
@@ -71,7 +71,7 @@ sub edit : Path : Args(2) {
my @live_contact_ids = map { $_->id } @live_contacts;
my @new_contact_ids = grep { $c->get_param("contacts[$_]") } @live_contact_ids;
$priority->contact_response_priorities->search({
- contact_id => { '!=' => \@new_contact_ids },
+ contact_id => { -not_in => \@new_contact_ids },
})->delete;
foreach my $contact_id (@new_contact_ids) {
$priority->contact_response_priorities->find_or_create({
diff --git a/perllib/FixMyStreet/App/Controller/Admin/Users.pm b/perllib/FixMyStreet/App/Controller/Admin/Users.pm
index 657bfafa9..1edddd960 100644
--- a/perllib/FixMyStreet/App/Controller/Admin/Users.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin/Users.pm
@@ -282,7 +282,7 @@ sub edit : Path : Args(1) {
my @user_permissions = grep { $c->get_param("permissions[$_]") ? 1 : undef } @all_permissions;
$user->admin_user_body_permissions->search({
body_id => $user->from_body->id,
- permission_type => { '!=' => \@user_permissions },
+ permission_type => { -not_in => \@user_permissions },
})->delete;
foreach my $permission_type (@user_permissions) {
$user->user_body_permissions->find_or_create({
@@ -302,7 +302,7 @@ sub edit : Path : Args(1) {
my @trusted_bodies = $c->get_param_list('trusted_bodies');
if ( $c->user->is_superuser ) {
$user->user_body_permissions->search({
- body_id => { '!=' => \@trusted_bodies },
+ body_id => { -not_in => \@trusted_bodies },
permission_type => 'trusted',
})->delete;
foreach my $body_id (@trusted_bodies) {