mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
handle nil product descriptions
This commit is contained in:
@@ -21,7 +21,7 @@ class Api::ProductSerializer < ActiveModel::Serializer
|
||||
|
||||
# return a sanitized html description
|
||||
def description_html
|
||||
sanitizer.sanitize_content(object.description).html_safe
|
||||
sanitizer.sanitize_content(object.description)&.html_safe
|
||||
end
|
||||
|
||||
def properties_with_values
|
||||
|
||||
Reference in New Issue
Block a user