瀏覽代碼

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!


Loading…
取消
儲存