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-12-16 18:10:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-16 18:10:18 +0300
commit6364c14cc1f445d471bca118dca5af5a85b2c5dc (patch)
tree2579c5592f207e86ff7a0c5c7499caad723cdec1 /app/models/timelog.rb
parent5a2284f3500088e04cf3a5854fb06dc9db2b6077 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/timelog.rb')
-rw-r--r--app/models/timelog.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/timelog.rb b/app/models/timelog.rb
index 60aaaaef831..f4debedb656 100644
--- a/app/models/timelog.rb
+++ b/app/models/timelog.rb
@@ -1,8 +1,10 @@
# frozen_string_literal: true
class Timelog < ApplicationRecord
+ include Importable
+
validates :time_spent, :user, presence: true
- validate :issuable_id_is_present
+ validate :issuable_id_is_present, unless: :importing?
belongs_to :issue, touch: true
belongs_to :merge_request, touch: true