FIX: `nil` error in list, incorrect count in reviewable pending

This commit is contained in:
Robin Ward 2019-04-22 12:18:57 -04:00
parent 3f9ec197e7
commit a8e3ac90a0
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@
<span class='posts' title='<%= t 'posts' %>'><%= t.posts_count %></span>
</td>
<td>
<%= I18n.l(t.last_posted_at, format: :date_only) %>
<%= I18n.l(t.last_posted_at || t.created_at, format: :date_only) %>
</td>
</tr>
<% end %>

View File

@ -233,7 +233,7 @@ class NewPostManager
result.reviewable = reviewable
result.reason = reason if reason
result.check_errors(errors)
result.pending_count = Reviewable.where(created_by: @user).pending.count
result.pending_count = ReviewableQueuedPost.where(created_by: @user).pending.count
result
end