FIX: Allow pending posts to have empty titles (#23366)

It's possible for a pending post to have a nil title. The PendingPostSerializer should not throw an error when this is encountered.
This commit is contained in:
jbrw 2023-09-01 12:43:25 -04:00 committed by GitHub
parent 9c65e2140a
commit 909620db18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -22,6 +22,6 @@ class PendingPostSerializer < ApplicationSerializer
end
def title
payload["title"] || topic.title
payload["title"] || topic&.title
end
end