Closed MatthiasCr closed 1 year ago
The sql query
@item.permissions.joins(:group).where.not('groups.tag': "personal_group")
does only detect groups with tag "everyone_group" NOT the groups with tag nil. Therefore it does not delete the normal groups which leads to their duplication. If you do the opposite and don't use not it works:
nil
not
@item.permissions.joins(:group).where('groups.tag': [nil, "everyone_group"])
resolves #398
don't know why the test is now failing ¯_(ツ)_/¯
The sql query
does only detect groups with tag "everyone_group" NOT the groups with tag
nil
. Therefore it does not delete the normal groups which leads to their duplication. If you do the opposite and don't usenot
it works:resolves #398