Fix /spec/models/spree/product_spec.rb:118

This commit is contained in:
Andy Brett
2021-04-08 13:57:29 -07:00
committed by Matt-Yorkley
parent d381b2a544
commit 52525dc437

View File

@@ -465,7 +465,7 @@ module Spree
# Spree creates a permalink already but our implementation fixes an edge case.
def sanitize_permalink
return unless permalink.blank? || saved_change_to_permalink?
return unless permalink.blank? || saved_change_to_permalink? || permalink_changed?
requested = permalink.presence || permalink_was.presence || name.presence || 'product'
self.permalink = create_unique_permalink(requested.parameterize)