mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
Fix /spec/models/spree/product_spec.rb:118
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user