ship highest staff post number to staff
This commit is contained in:
parent
b45fd21ed9
commit
c2a17826e7
|
@ -26,6 +26,10 @@ class ListableTopicSerializer < BasicTopicSerializer
|
||||||
|
|
||||||
has_one :last_poster, serializer: BasicUserSerializer, embed: :objects
|
has_one :last_poster, serializer: BasicUserSerializer, embed: :objects
|
||||||
|
|
||||||
|
def highest_post_number
|
||||||
|
(scope.is_staff? && object.highest_staff_post_number) || object.highest_post_num
|
||||||
|
end
|
||||||
|
|
||||||
def liked
|
def liked
|
||||||
object.user_data && object.user_data.liked
|
object.user_data && object.user_data.liked
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue