about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-12-02 21:19:41 +0100
committerGitHub <noreply@github.com>2020-12-02 21:19:41 +0100
commitfbff89be037c751932c720b0d5cd9221e430be5f (patch)
tree95e119e34e71a7e7a222cdbe7abe95b14919eaf8 /lib
parent4b7f21a28ec59452411b16e66cdbb290d4761b14 (diff)
Fix tootctl ip_blocks add failing if not given a comment (#15263)
Fixes #15261
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/ip_blocks_cli.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mastodon/ip_blocks_cli.rb b/lib/mastodon/ip_blocks_cli.rb
index 6aff36d90..5c38c1aca 100644
--- a/lib/mastodon/ip_blocks_cli.rb
+++ b/lib/mastodon/ip_blocks_cli.rb
@@ -47,7 +47,7 @@ module Mastodon
         ip_block ||= IpBlock.new(ip: address)
 
         ip_block.severity   = options[:severity]
-        ip_block.comment    = options[:comment]
+        ip_block.comment    = options[:comment] if options[:comment].present?
         ip_block.expires_in = options[:duration]
 
         if ip_block.save