Skip to content
Snippets Groups Projects
Commit 713bb41d authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Merge branch 'feature/previous_links' of github.com:noesya/osuny into feature/previous_links

parents a3e6216d 20923682
No related branches found
No related tags found
No related merge requests found
......@@ -23,9 +23,9 @@ module WithPermalink
new_permalink = new_permalink_in_website(website)
# If the object had no permalink or if its path changed, we create a new permalink
if new_permalink.computed_path.present? && (last_permalink.nil? || last_permalink.path != new_permalink.computed_path)
if new_permalink.computed_path.present? && (current_permalink.nil? || current_permalink.path != new_permalink.computed_path)
new_permalink.path = new_permalink.computed_path
last_permalink&.update(is_current: false) if new_permalink.save
current_permalink&.update(is_current: false) if new_permalink.save
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment