1
0
mirror of synced 2026-08-06 02:16:55 +00:00

[FIX] The user_list parameter returned user objects instead of their IDs (#239)

This commit is contained in:
Canapin
2023-04-15 23:02:32 +02:00
committed by GitHub
parent b565d70dd5
commit 98e96fccc2
+1 -1
View File
@@ -203,7 +203,7 @@ module ::DiscourseDataExplorer
value = string.split(",").map { |s| s.downcase == "#null" ? nil : s }
invalid_format string, "can't be empty" if value.length == 0
when :user_list
value = string.split(",").map { |s| User.find_by_username_or_email(s) }
value = string.split(",").map { |s| User.find_by_username_or_email(s).id }
invalid_format string, "can't be empty" if value.length == 0
else
raise TypeError.new("unknown parameter type??? should not get here")