From fbff89be037c751932c720b0d5cd9221e430be5f Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 2 Dec 2020 21:19:41 +0100 Subject: [PATCH] Fix tootctl ip_blocks add failing if not given a comment (#15263) Fixes #15261 --- lib/mastodon/ip_blocks_cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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