about summary refs log tree commit diff
path: root/app/serializers/rest
diff options
context:
space:
mode:
authortrwnh <a@trwnh.com>2022-11-08 09:37:41 -0600
committerGitHub <noreply@github.com>2022-11-08 16:37:41 +0100
commit455a754081cd5ba7b5b4979cc62cb1d2f7867ed5 (patch)
tree566139edb48cb43786d47418999faf58c02e47c5 /app/serializers/rest
parent68d9dcd425468a4b2cca46de7de462eaa27c80f0 (diff)
Fix missing cast of status and rule IDs to string (fix #19048) (#20122)
Diffstat (limited to 'app/serializers/rest')
-rw-r--r--app/serializers/rest/report_serializer.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/serializers/rest/report_serializer.rb b/app/serializers/rest/report_serializer.rb
index de68dfc6d..f4e9af249 100644
--- a/app/serializers/rest/report_serializer.rb
+++ b/app/serializers/rest/report_serializer.rb
@@ -9,4 +9,12 @@ class REST::ReportSerializer < ActiveModel::Serializer
   def id
     object.id.to_s
   end
+
+  def status_ids
+    object&.status_ids&.map(&:to_s)
+  end
+
+  def rule_ids
+    object&.rule_ids&.map(&:to_s)
+  end
 end