summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
authorNathan Friend <nfriend@gitlab.com>2019-01-08 09:10:48 -0400
committerNathan Friend <nfriend@gitlab.com>2019-01-18 11:11:54 -0400
commit51359a1fb8976292b4735715e5cb4cbf664ab34b (patch)
treefbbd3ff7145c1b0e65dc62a82150040542ecd08c /app/models/label.rb
parent5e01cf72249725cb6e0c8aa3d28325d9b4942566 (diff)
downloadgitlab-ce-51359a1fb8976292b4735715e5cb4cbf664ab34b.tar.gz
Fix inconsistent label foreground color53714-inconsistent-text-color-for-labels
In different parts of the application, the same label was being rendered with a different foreground color. This was due to the "textColor" JSON property not being generated by the backend. This commit adds this property to JSON representation of labels.
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 5d2d1afd1d9..1c3db3eb35d 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -214,6 +214,7 @@ class Label < ActiveRecord::Base
super(options).tap do |json|
json[:type] = self.try(:type)
json[:priority] = priority(options[:project]) if options.key?(:project)
+ json[:textColor] = text_color
end
end