From a1a839c99f7d9ce69ce0712d93951dba216ecb11 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Wed, 6 Sep 2017 13:25:15 -0300 Subject: [PATCH] Fix failing spec --- app/models/label.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- GitLab