Read about our upcoming Code of Conduct on this issue

Unverified Commit 35c4351e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Validate project creator only on create

This fixes bug when creator was removed and you cant edit project
because validation requires creator.
Signed-off-by: default avatarDmitriy Zaporozhets <>
parent 05e8b038cf42
......@@ -81,7 +81,7 @@ class Project < ActiveRecord::Base
delegate :members, to: :team, prefix: true
# Validations
validates :creator, presence: true
validates :creator, presence: true, on: :create
validates :description, length: { maximum: 2000 }, allow_blank: true
validates :name, presence: true, length: { within: 0..255 },
format: { with: Gitlab::Regex.project_name_regex,
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