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:
authorFelipe Artur <felipefac@gmail.com>2017-09-06 19:25:15 +0300
committerFelipe Artur <felipefac@gmail.com>2017-09-06 19:25:15 +0300
commita1a839c99f7d9ce69ce0712d93951dba216ecb11 (patch)
tree0eb7a573a1099add23072a2912deef6c6921b077 /app/models/label.rb
parentf9fbae2e2712f3e7416c01c5e7ef6a6e021566b9 (diff)
Fix failing spec
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 0298e7b417c..958141a7358 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -173,7 +173,7 @@ class Label < ActiveRecord::Base
def as_json(options = {})
super(options).tap do |json|
- json[:type] = self.type
+ json[:type] = self.try(:type)
json[:priority] = priority(options[:project]) if options.key?(:project)
end
end