ソースを参照

Fix error when `scheduled_at` attribute is malformed (#9866)

master
Eugen Rochko 5年前
committed by GitHub
コミット
6ca9015789
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更2行の追加0行の削除
  1. +2
    -0
      app/services/post_status_service.rb

+ 2
- 0
app/services/post_status_service.rb ファイルの表示

@@ -49,6 +49,8 @@ class PostStatusService < BaseService
@visibility = :unlisted if @visibility == :public && @account.silenced
@scheduled_at = @options[:scheduled_at]&.to_datetime
@scheduled_at = nil if scheduled_in_the_past?
rescue ArgumentError
raise ActiveRecord::RecordInvalid
end

def process_status!


読み込み中…
キャンセル
保存