Fix any_relations always being false

Closes #1976
This commit is contained in:
Xuyang Jia 2018-09-22 17:40:44 +01:00 committed by Tom Hughes
parent de29e9b3f5
commit d0e45c7c8e
2 changed files with 28 additions and 1 deletions

View file

@ -381,7 +381,7 @@ class Relation < ActiveRecord::Base
# reasonable on the assumption that adding or removing members doesn't
# materially change the rest of the relation.
any_relations =
changed_members.collect { |_id, type| type == "relation" }
changed_members.collect { |type, _id, _role| type == "Relation" }
.inject(false) { |acc, elem| acc || elem }
update_members = if tags_changed || any_relations