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:
Shivam Mishra
2023-05-18 18:42:28 +05:30
committed by GitHub
parent 590ce788b9
commit f2f33038f2
2 changed files with 27 additions and 3 deletions

View File

@@ -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