diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-31 02:21:56 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-10-31 03:13:39 +0300 |
commit | 1796936abc8873c1fcc38061fe3d8b44acda3ffe (patch) | |
tree | fa1544c2bacc27624f2c107dbf6679dc6ceb08d4 /app | |
parent | bba020a56cbedd6403b637ec7f9eaee258eb7c67 (diff) |
Handle large values on `MergeRequestDiffCommit` dates
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 |