fix: Make category non-mandatory (#7117)
Creating articles in a new help center without categories throws an error. This PR fixes that.
This commit is contained in:
@@ -8,11 +8,12 @@ json.position article.position
|
||||
json.account_id article.account_id
|
||||
json.updated_at article.updated_at.to_i
|
||||
json.meta article.meta
|
||||
|
||||
json.category do
|
||||
json.id article.category_id
|
||||
json.name article.category.name
|
||||
json.slug article.category.slug
|
||||
json.locale article.category.locale
|
||||
json.name article.category&.name
|
||||
json.slug article.category&.slug
|
||||
json.locale article.category&.locale
|
||||
end
|
||||
|
||||
json.views article.views
|
||||
|
||||
Reference in New Issue
Block a user