Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2018-02-04 22:46:14 +0300
committerAndreas Brandl <abrandl@gitlab.com>2018-02-05 18:16:57 +0300
commit24a11c957a34d2f22c0276fa8dcc3e2c23d1f164 (patch)
treede56172ee3b0627f5bebb74a8d08ea13c3dc3aa7 /app/models/todo.rb
parentd07addbf6e3841ae31a7e62ecbb29523f4d8c859 (diff)
Set todos#author_id to NOT NULL.
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r--app/models/todo.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb
index 7af54b2beb2..bb5965e20eb 100644
--- a/app/models/todo.rb
+++ b/app/models/todo.rb
@@ -28,6 +28,7 @@ class Todo < ActiveRecord::Base
delegate :name, :email, to: :author, prefix: true, allow_nil: true
validates :action, :project, :target_type, :user, presence: true
+ validates :author, presence: true
validates :target_id, presence: true, unless: :for_commit?
validates :commit_id, presence: true, if: :for_commit?