mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:52:50 +08:00
Fix [object object] being rendered where it should be an ip address
This commit is contained in:
parent
6597738322
commit
2342da893d
|
@ -83,4 +83,8 @@ class AdminUserSerializer < BasicUserSerializer
|
|||
scope.can_deactivate?(object)
|
||||
end
|
||||
|
||||
def ip_address
|
||||
object.ip_address.try(:to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -9,4 +9,9 @@ class ScreenedEmailSerializer < ApplicationSerializer
|
|||
def action
|
||||
ScreenedEmail.actions.key(object.action_type).to_s
|
||||
end
|
||||
|
||||
def ip_address
|
||||
object.ip_address.try(:to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -10,4 +10,8 @@ class ScreenedIpAddressSerializer < ApplicationSerializer
|
|||
ScreenedIpAddress.actions.key(object.action_type).to_s
|
||||
end
|
||||
|
||||
def ip_address
|
||||
object.ip_address.try(:to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -10,4 +10,9 @@ class ScreenedUrlSerializer < ApplicationSerializer
|
|||
def action
|
||||
ScreenedUrl.actions.key(object.action_type).to_s
|
||||
end
|
||||
|
||||
def ip_address
|
||||
object.ip_address.try(:to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user