Skip to content
Snippets Groups Projects
Verified 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 <dmitriy.zaporozhets@gmail.com>
parent 4db2e97b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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,
Loading
Loading
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