diff options
author | Stan Hu <stanhu@gmail.com> | 2017-03-21 03:00:09 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-03-21 03:00:09 +0000 |
commit | 2cdfbbfc2f4b6e7627d1be43635bba64d082e803 (patch) | |
tree | 86aae112e515aa63b5f97f8952d3d0b795c79843 /app/models | |
parent | 4ea85da9fb99bc4d875cc3dc644476f34f0b8bc3 (diff) | |
parent | 9bf9e6eb38b955791abce475dbaec1001d6c39c0 (diff) | |
download | gitlab-ce-2cdfbbfc2f4b6e7627d1be43635bba64d082e803.tar.gz |
Merge branch 'rs-issue-29592' into 'master'
Handle Route#name being nil after an update
Closes #29592
See merge request !10102
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/route.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/route.rb b/app/models/route.rb index 73574a6206b..41e6eb7cb73 100644 --- a/app/models/route.rb +++ b/app/models/route.rb @@ -21,7 +21,7 @@ class Route < ActiveRecord::Base attributes[:path] = route.path.sub(path_was, path) end - if name_changed? && route.name.present? + if name_changed? && name_was.present? && route.name.present? attributes[:name] = route.name.sub(name_was, name) end |