Skip to content
Snippets Groups Projects
Commit 7ac5dfc1 authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Fix pipeline schedule when owner is nil

Fixing the bug
parent c327d02b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,7 +7,7 @@ module Ci
# Otherwise, multiple pipelines could be created in a short interval.
schedule.schedule_next_run!
 
RunPipelineScheduleWorker.perform_async(schedule.id, schedule.owner.id)
RunPipelineScheduleWorker.perform_async(schedule.id, schedule.owner&.id)
end
end
end
---
title: Fix pipeline schedules when owner is nil
merge_request:
author:
type: fixed
Loading
Loading
@@ -24,5 +24,13 @@ describe Ci::PipelineScheduleService do
 
subject
end
context 'when owner is nil' do
let(:schedule) { create(:ci_pipeline_schedule, project: project, owner: nil) }
it 'does not raise an error' do
expect { subject }.not_to raise_error
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment