summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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