FIX: topic might be night at this stage (#12929)

This commit is contained in:
Joffrey JAFFEUX 2021-05-03 10:37:43 +02:00 committed by GitHub
parent 3ff9dbb15c
commit 374ff4c54c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ module PostGuardian
SiteSetting.trusted_users_can_edit_others? &&
@user.has_trust_level?(TrustLevel[4])
) ||
is_category_group_moderator?(post.topic.category)
is_category_group_moderator?(post.topic&.category)
)
if post.topic&.archived? || post.user_deleted || post.deleted_at