Fix tootctl ip_blocks add failing if not given a comment (#15263)

Fixes #15261
lolsob-rspec
ThibG 2020-12-02 21:19:41 +01:00 committed by GitHub
parent 879f86f323
commit 27a1419a65
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ module Mastodon
ip_block ||= IpBlock.new(ip: address) ip_block ||= IpBlock.new(ip: address)
ip_block.severity = options[:severity] 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] ip_block.expires_in = options[:duration]
if ip_block.save if ip_block.save