diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-10 03:08:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-10 03:08:55 +0300 |
commit | 44a9f0d5c8339db14de6df522d114ef78791439f (patch) | |
tree | 94b0ab0ed5d27cca8a0466f2e119681d97661f28 /app/models/group_import_state.rb | |
parent | 64786982930713d095ccd3aebd812182a1879fed (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/group_import_state.rb')
-rw-r--r-- | app/models/group_import_state.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/group_import_state.rb b/app/models/group_import_state.rb index 7773b887249..a4c7092b80f 100644 --- a/app/models/group_import_state.rb +++ b/app/models/group_import_state.rb @@ -5,7 +5,8 @@ class GroupImportState < ApplicationRecord belongs_to :group, inverse_of: :import_state - validates :group, :status, :jid, presence: true + validates :group, :status, presence: true + validates :jid, presence: true, if: -> { started? || finished? } state_machine :status, initial: :created do state :created, value: 0 |