FIX: Get topic's category instead of array's (#388)

Currently we're seeing 500s when related_topics are getting rendered. We should get the topic's category rather than on the array.
```
ActionView::Template::Error (undefined method `category' for [#<Topic id ... ]
```
This commit is contained in:
Natalie Tay 2023-12-29 16:52:48 +08:00 committed by GitHub
parent 933784a873
commit 73c58155f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@
</div>
<% end %>
</div>
<% if t.pinned_until && (t.pinned_until > Time.zone.now) && (t.pinned_globally || @list.category) && t.excerpt %>
<% if t.pinned_until && (t.pinned_until > Time.zone.now) && (t.pinned_globally || t.category) && t.excerpt %>
<p class='excerpt'>
<%= t.excerpt.html_safe %>
</p>