mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-24 21:45:06 +01:00
Fix tootctl ip_blocks add failing if not given a comment (#15263)
Fixes #15261
This commit is contained in:
parent
4b7f21a28e
commit
fbff89be03
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user