Merge remote-tracking branch 'parent/main' into upstream-20240327
This commit is contained in:
commit
ace193fda3
75 changed files with 435 additions and 462 deletions
|
@ -30,14 +30,16 @@ class Admin::Import
|
|||
|
||||
csv_converter = lambda do |field, field_info|
|
||||
case field_info.header
|
||||
when '#domain', '#public_comment'
|
||||
when '#domain'
|
||||
field&.downcase&.strip
|
||||
when '#public_comment'
|
||||
field&.strip
|
||||
when '#severity'
|
||||
field&.strip&.to_sym
|
||||
field&.downcase&.strip&.to_sym
|
||||
when '#reject_media', '#reject_reports', '#obfuscate', '#reject_favourite', '#reject_send_sensitive',
|
||||
'#reject_hashtag', '#reject_straight_follow', '#reject_new_follow', '#hidden', '#detect_invalid_subscription',
|
||||
'#reject_reply_exclude_followers', '#reject_friend', '#block_trends'
|
||||
ActiveModel::Type::Boolean.new.cast(field)
|
||||
ActiveModel::Type::Boolean.new.cast(field&.downcase)
|
||||
else
|
||||
field
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue