Commit 2dd92164 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '212673-fix-undefined-method-exception' into 'master'

Fixes exception raised when viewing repository settings

Closes #212673

See merge request gitlab-org/gitlab!28879
parents 7eb91eea 7a75a16d
...@@ -97,6 +97,7 @@ module EE ...@@ -97,6 +97,7 @@ module EE
def mirror_update_due? def mirror_update_due?
return false unless project.mirror_with_content? return false unless project.mirror_with_content?
return false unless next_execution_timestamp?
return false if project.archived? return false if project.archived?
return false if hard_failed? return false if hard_failed?
return false if updating_mirror? return false if updating_mirror?
......
---
title: Fix repository settings page loading issues for some imported projects with pull mirroring
merge_request: 28879
author:
type: fixed
...@@ -271,6 +271,15 @@ describe ProjectImportState, type: :model do ...@@ -271,6 +271,15 @@ describe ProjectImportState, type: :model do
expect(import_state.mirror_update_due?).to be false expect(import_state.mirror_update_due?).to be false
end end
end end
context 'when next_execution_timestamp is nil' do
it 'returns false' do
import_state = create(:import_state, :finished, :mirror, :repository)
import_state.next_execution_timestamp = nil
expect(import_state.mirror_update_due?).to be false
end
end
end end
describe '#last_update_status' do describe '#last_update_status' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment