Skip to content

Bug fix for setting accessed before creation

Allison Browne requested to merge bug-fix-nil-ci-settings into master

What does this MR do and why?

While enabling #429699 (closed).

I noticed an error coming through when ci_cd_settings is nil:

https://new-sentry.gitlab.net/organizations/gitlab/issues/464430/?query=is%3Aunresolved+assigned%3Ame&referrer=issue-stream&statsPeriod=14d&stream_index=0.

The setting object is created by the after_create on the project. So this error must occur when users make a request in between the project being created and the callback being executed.

Edited by Allison Browne

Merge request reports