diff --git a/app/models/page_groupers/group_allyship.rb b/app/models/page_groupers/group_allyship.rb index a63382e1c..4e3e00c84 100644 --- a/app/models/page_groupers/group_allyship.rb +++ b/app/models/page_groupers/group_allyship.rb @@ -15,6 +15,6 @@ class GroupAllyship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.ally_id) - other_object.allies.delete this_object + other_object.allies.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/group_enemyship.rb b/app/models/page_groupers/group_enemyship.rb index d3f2972ef..d0cb01d43 100644 --- a/app/models/page_groupers/group_enemyship.rb +++ b/app/models/page_groupers/group_enemyship.rb @@ -15,6 +15,6 @@ class GroupEnemyship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.enemy_id) - other_object.enemies.delete this_object + other_object.enemies.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/sistergroupship.rb b/app/models/page_groupers/sistergroupship.rb index 464e38256..01a7543f0 100644 --- a/app/models/page_groupers/sistergroupship.rb +++ b/app/models/page_groupers/sistergroupship.rb @@ -15,6 +15,6 @@ class Sistergroupship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.sistergroup_id) - other_object.sistergroups.delete this_object + other_object.sistergroups.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/subgroupship.rb b/app/models/page_groupers/subgroupship.rb index 22bb06c7f..e1aa651e4 100644 --- a/app/models/page_groupers/subgroupship.rb +++ b/app/models/page_groupers/subgroupship.rb @@ -18,6 +18,6 @@ class Subgroupship < ApplicationRecord this_object = Group.find_by(id: self.group_id) other_object = Group.find_by(id: self.subgroup_id) - other_object.supergroups.delete(this_object) + other_object.supergroups.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/technology_child_technology.rb b/app/models/page_groupers/technology_child_technology.rb index 3816ef0d6..decf5dc6d 100644 --- a/app/models/page_groupers/technology_child_technology.rb +++ b/app/models/page_groupers/technology_child_technology.rb @@ -20,6 +20,6 @@ class TechnologyChildTechnology < ApplicationRecord this_object = Technology.find_by(id: self.technology_id) other_object = Technology.find_by(id: self.child_technology_id) - other_object.parent_technologies.delete(this_object) + other_object.parent_technologies.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/technology_parent_technology.rb b/app/models/page_groupers/technology_parent_technology.rb index ec51bb467..1147ed6f4 100644 --- a/app/models/page_groupers/technology_parent_technology.rb +++ b/app/models/page_groupers/technology_parent_technology.rb @@ -20,6 +20,6 @@ class TechnologyParentTechnology < ApplicationRecord this_object = Technology.find_by(id: self.technology_id) other_object = Technology.find_by(id: self.parent_technology_id) - other_object.child_technologies.delete(this_object) + other_object.child_technologies.delete(this_object) if other_object.present? end end diff --git a/app/models/page_groupers/technology_related_technology.rb b/app/models/page_groupers/technology_related_technology.rb index e8c187721..5a4f73ee7 100644 --- a/app/models/page_groupers/technology_related_technology.rb +++ b/app/models/page_groupers/technology_related_technology.rb @@ -14,6 +14,6 @@ class TechnologyRelatedTechnology < ApplicationRecord this_object = Technology.find_by(id: self.technology_id) other_object = Technology.find_by(id: self.related_technology_id) - other_object.related_technologies.delete(this_object) + other_object.related_technologies.delete(this_object) if other_object.present? end end