gitlab-org--gitlab-foss/app
Nick Thomas a5a444906d Fix the project auto devops API
If `project_auto_devops.enabled` is nil for a project, when setting any
auto devops values via the API, we try to create a new row in the DB,
instead of re-using the existing one. This leads to the project_id
being set to nil, and the database `NOT NULL` constraint leading to a
500 response.

This commit resolves the issue by correctly detecting the presence of a
ProjectAutoDevops row and re-using it. Persistence is also moved away
from explicit `update!` calls and into relying on `autosave: true` on
the model.
2019-07-19 21:39:26 +00:00
..
assets Merge branch '64160-fix-duplicate-buttons' into 'master' 2019-07-19 17:43:03 +00:00
controllers Added Usage Data for some Web IDE actions 2019-07-19 11:11:27 +00:00
finders Merge branch '40379-CJK-search-min-chars' into 'master' 2019-07-08 09:49:43 +00:00
graphql Added submodule links to Submodule type in GraphQL API 2019-07-17 13:06:19 +00:00
helpers Added submodule links to Submodule type in GraphQL API 2019-07-17 13:06:19 +00:00
mailers
models Fix the project auto devops API 2019-07-19 21:39:26 +00:00
policies Allow use of legacy triggers with feature flag 2019-07-15 15:05:22 +02:00
presenters Refactor: model errors for multi cluster validation 2019-07-11 17:22:58 +10:00
serializers Merge branch 'adjust-cycle-analytics-to-group-level' into 'master' 2019-07-18 09:23:54 +00:00
services CE port for milestones should not be set on epics issue promotion 2019-07-18 18:52:10 +00:00
uploaders Add a rubocop for Rails.logger 2019-07-10 19:26:47 +00:00
validators Lesser Namespace#name validations 2019-07-09 18:09:45 +02:00
views Merge branch 'add-metadata-to-epic-list-view-ce' into 'master' 2019-07-19 14:31:24 +00:00
workers Merge branch 'an-sidekiq-chaos' into 'master' 2019-07-18 20:43:49 +00:00