summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2017-09-06 13:25:15 -0300
committerFelipe Artur <felipefac@gmail.com>2017-09-06 13:25:15 -0300
commita1a839c99f7d9ce69ce0712d93951dba216ecb11 (patch)
tree0eb7a573a1099add23072a2912deef6c6921b077
parentf9fbae2e2712f3e7416c01c5e7ef6a6e021566b9 (diff)
downloadgitlab-ce-a1a839c99f7d9ce69ce0712d93951dba216ecb11.tar.gz
Fix failing specee_issue_928_backport
-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