Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-19 18:08:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-19 18:08:58 +0300
commit589b674b06c4acb5c357f6444fb0b7344585fdc5 (patch)
treef09182299a438c68d7655beba776f601acc71ded /app/models/audit_event.rb
parent6559f0ee67c564d62e12936e91cef6abf37ce102 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/audit_event.rb')
-rw-r--r--app/models/audit_event.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/audit_event.rb b/app/models/audit_event.rb
index 929e7ecbf48..34f03e769a0 100644
--- a/app/models/audit_event.rb
+++ b/app/models/audit_event.rb
@@ -4,6 +4,7 @@ class AuditEvent < ApplicationRecord
include CreatedAtFilterable
include IgnorableColumns
include BulkInsertSafe
+ include EachBatch
PARALLEL_PERSISTENCE_COLUMNS = [
:author_name,
@@ -54,7 +55,9 @@ class AuditEvent < ApplicationRecord
end
def initialize_details
- self.details = {} if details.nil?
+ return unless self.has_attribute?(:details)
+
+ self.details = {} if details&.nil?
end
def author_name