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

This commit is contained in:
Andy Brett
2021-04-08 13:57:29 -07:00
parent b53b162c2b
commit b3bd60702b

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)