Skip to content

Commit

Permalink
Hopefully handle empty private comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby committed Jul 29, 2024
1 parent 19faacd commit 28c643c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin/export_domain_blocks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def import
@domain_blocks = @import.csv_rows.filter_map do |row|
domain = row['#domain'].strip
next if DomainBlock.rule_for(domain).present?

Check failure on line 32 in app/controllers/admin/export_domain_blocks_controller.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Layout/TrailingWhitespace: Trailing whitespace detected. (https://rubystyle.guide#no-trailing-whitespace)
domain_block = DomainBlock.new(domain: domain,
severity: row.fetch('#severity', :suspend),
reject_media: row.fetch('#reject_media', false),
reject_reports: row.fetch('#reject_reports', false),
private_comment: row['#private_comment'] + ' | ' + @global_private_comment,
private_comment: (row['#private_comment'] + ' | ' or "| ") + @global_private_comment,

Check failure on line 37 in app/controllers/admin/export_domain_blocks_controller.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)

Check failure on line 37 in app/controllers/admin/export_domain_blocks_controller.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://rubystyle.guide#consistent-string-literals)
public_comment: row['#public_comment'],
obfuscate: row.fetch('#obfuscate', false))

Expand Down

0 comments on commit 28c643c

Please sign in to comment.