Commit 7a75a16d authored by DeAndre Harris's avatar DeAndre Harris Committed by Dylan Griffith

Fixes exception raised when viewing repository settings

parent 72d7d5cb
......@@ -97,6 +97,7 @@ module EE
def mirror_update_due?
return false unless project.mirror_with_content?
return false unless next_execution_timestamp?
return false if project.archived?
return false if hard_failed?
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
expect(import_state.mirror_update_due?).to be false
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
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