Changing a subgroup path always results in an invalid parent group
Summary
Changing a subgroup path always results in an invalid parent group.
Steps to reproduce
- Create group 'foo'
- Create subgroup 'bar' under 'foo'
- Rename subgroup 'bar' to 'baz'
-
Group.find_by_name('foo').valid? => false
due toensure_permanent_paths
validation due toconflicting_redirect_exists?
returning true becauseRedirectRoute.permanent.matching_path_and_descendants('foo')
returns the descendant subgroup's permanent redirect
What is the current bug behavior?
Parent group is invalid.
What is the expected correct behavior?
Parent group remains valid.
Possible fixes
Not sure yet.