about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-11-19 10:37:57 +0100
committerGitHub <noreply@github.com>2018-11-19 10:37:57 +0100
commit1d38c9750a478703d3ce087d4c42cfc2118f830d (patch)
treeb0ca0fa0a8453cb727be93d9d7cd1159f44ed2b7 /app/serializers
parentd6b9a62e0a13497b8cc40eb1db56d1ec2b3760ea (diff)
Fix filter ID not being a string in REST API (#9303)
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/rest/filter_serializer.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/rest/filter_serializer.rb b/app/serializers/rest/filter_serializer.rb
index 3134be371..57205630b 100644
--- a/app/serializers/rest/filter_serializer.rb
+++ b/app/serializers/rest/filter_serializer.rb
@@ -3,4 +3,8 @@
 class REST::FilterSerializer < ActiveModel::Serializer
   attributes :id, :phrase, :context, :whole_word, :expires_at,
              :irreversible
+
+  def id
+    object.id.to_s
+  end
 end