Change max length of media descriptions from 420 to 1500 characters (#11819)

Fix #11658
This commit is contained in:
Eugen Rochko 2019-09-13 16:00:34 +02:00 committed by GitHub
parent bc869501f5
commit b6381bdc7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -123,7 +123,7 @@ class MediaAttachment < ApplicationRecord
include Attachmentable
validates :account, presence: true
validates :description, length: { maximum: 420 }, if: :local?
validates :description, length: { maximum: 1_500 }, if: :local?
scope :attached, -> { where.not(status_id: nil).or(where.not(scheduled_status_id: nil)) }
scope :unattached, -> { where(status_id: nil, scheduled_status_id: nil) }