1
0
Fork 0
forked from gitea/nas

Merge pull request #801 from kmycode/upstream-20240817

Upstream 20240817
This commit is contained in:
KMY(雪あすか) 2024-08-17 10:22:34 +09:00 committed by GitHub
commit fef0b7e28b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 1377 additions and 472 deletions

View file

@ -427,7 +427,7 @@ class MediaAttachment < ApplicationRecord
attachment = public_send(attachment_name)
styles = DEFAULT_STYLES | attachment.styles.keys
styles.map { |style| attachment.path(style) }
end
end.compact
rescue => e
# We really don't want any error here preventing media deletion
Rails.logger.warn "Error #{e.class} busting cache: #{e.message}"

View file

@ -103,7 +103,7 @@ class User < ApplicationRecord
validates :email, presence: true, email_address: true
validates_with BlacklistedEmailValidator, if: -> { ENV['EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION'] == 'true' || !confirmed? }
validates_with UserEmailValidator, if: -> { ENV['EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION'] == 'true' || !confirmed? }
validates_with EmailMxValidator, if: :validate_email_dns?
validates :agreement, acceptance: { allow_nil: false, accept: [true, 'true', '1'] }, on: :create