Skip to content

Commit

Permalink
DEV: Respect plugin enabled state when serializing (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq committed Apr 24, 2023
1 parent 3af2747 commit 25c412d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def self.remove_note(user, note_id)
(SiteSetting.user_notes_moderators_delete? && user.staff?) || user.admin?
end

add_to_serializer(:admin_detailed_user, :user_notes_count, false) do
add_to_serializer(:admin_detailed_user, :user_notes_count) do
object.custom_fields && object.custom_fields["user_notes_count"].to_i
end

Expand Down

0 comments on commit 25c412d

Please sign in to comment.