summaryrefslogtreecommitdiff
path: root/app/models/project_label.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-13 17:45:39 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:26 -0200
commitcece77f273407da4a9ed66acda53e9ac4117dbaf (patch)
treedd758c4ad986de70f3a100c1f3bdc6782aea3f61 /app/models/project_label.rb
parentfc59d357201a907e6079f6f0a7fc9a31f2957f88 (diff)
downloadgitlab-ce-cece77f273407da4a9ed66acda53e9ac4117dbaf.tar.gz
Fix validation to allow updates to description/color of project label
Diffstat (limited to 'app/models/project_label.rb')
-rw-r--r--app/models/project_label.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project_label.rb b/app/models/project_label.rb
index a246a90435d..5b739bcdadf 100644
--- a/app/models/project_label.rb
+++ b/app/models/project_label.rb
@@ -14,7 +14,7 @@ class ProjectLabel < Label
private
def title_must_not_exist_at_group_level
- return unless group.present?
+ return unless group.present? && title_changed?
if group.labels.with_title(self.title).exists?
errors.add(:title, :label_already_exists_at_group_level, group: group.name)