From 27a1419a65b01bebbb7fc969cb8a58b4900f5870 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 6aff36d908..5c38c1aca0 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