diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-10-31 14:34:02 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-10-31 14:34:02 +0000 |
commit | 568508c7d549a3f498a72db824c9d97f4ba0e098 (patch) | |
tree | 9729a63f6b86f5196b3d43de97e1aa3a3a33cab0 /app | |
parent | bfb5107ae720232a15060ee55feba213ee7dd097 (diff) | |
parent | 1796936abc8873c1fcc38061fe3d8b44acda3ffe (diff) | |
download | gitlab-ce-568508c7d549a3f498a72db824c9d97f4ba0e098.tar.gz |
Merge branch '39561-seed_fu-fails-to-load-gitlab-test' into 'master'
Handle large values on `MergeRequestDiffCommit` dates
Closes #39561
See merge request gitlab-org/gitlab-ce!15093
Diffstat (limited to 'app')
-rw-r--r-- | app/models/merge_request_diff_commit.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/merge_request_diff_commit.rb b/app/models/merge_request_diff_commit.rb index 670b26d4ca3..b75387e236e 100644 --- a/app/models/merge_request_diff_commit.rb +++ b/app/models/merge_request_diff_commit.rb @@ -17,7 +17,9 @@ class MergeRequestDiffCommit < ActiveRecord::Base commit_hash.merge( merge_request_diff_id: merge_request_diff_id, relative_order: index, - sha: sha_attribute.type_cast_for_database(sha) + sha: sha_attribute.type_cast_for_database(sha), + authored_date: Gitlab::Database.sanitize_timestamp(commit_hash[:authored_date]), + committed_date: Gitlab::Database.sanitize_timestamp(commit_hash[:committed_date]) ) end |