diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 09:10:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 09:10:36 +0300 |
commit | e9ae9c5f2ee47b084038ff62319504fc6d0abf20 (patch) | |
tree | 6a515ac128d8a351ca028c45e2f29ab1065738a3 /app/models/concerns/sha_attribute.rb | |
parent | edd6fda56d54d7223eb67a15341603e44c3a5f7a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/sha_attribute.rb')
-rw-r--r-- | app/models/concerns/sha_attribute.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/concerns/sha_attribute.rb b/app/models/concerns/sha_attribute.rb index ba7c6c0cd8b..e49f4d03bda 100644 --- a/app/models/concerns/sha_attribute.rb +++ b/app/models/concerns/sha_attribute.rb @@ -3,11 +3,14 @@ module ShaAttribute extend ActiveSupport::Concern + # Needed for the database method + include DatabaseReflection + class_methods do def sha_attribute(name) return if ENV['STATIC_VERIFICATION'] - validate_binary_column_exists!(name) if Rails.env.development? + validate_binary_column_exists!(name) if Rails.env.development? || Rails.env.test? attribute(name, Gitlab::Database::ShaAttribute.new) end |