mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 07:23:43 +01:00
Call media.present? because media may be nil (#7474)
This commit is contained in:
parent
42a1231245
commit
3793e598d0
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ class PostStatusService < BaseService
|
||||||
media = validate_media!(options[:media_ids])
|
media = validate_media!(options[:media_ids])
|
||||||
status = nil
|
status = nil
|
||||||
text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present?
|
text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present?
|
||||||
text = '.' if text.blank? && !media.empty?
|
text = '.' if text.blank? && media.present?
|
||||||
|
|
||||||
ApplicationRecord.transaction do
|
ApplicationRecord.transaction do
|
||||||
status = account.statuses.create!(text: text,
|
status = account.statuses.create!(text: text,
|
||||||
|
|
Loading…
Reference in a new issue