[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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")