aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb
index 4ed4d7311fb..181b4332bf3 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/rule_failure.rb
@@ -28,7 +28,7 @@ class RuleFailure < ActiveRecord::Base
json['message'] = message
json['line'] = line if line
json['priority'] = Sonar::RulePriority.to_s(failure_level).upcase
- json['createdAt'] = format_datetime(created_at)
+ json['createdAt'] = format_datetime(created_at) if created_at
json['rule'] = {
:key => rule.key,
:name => rule.name}
@@ -46,7 +46,7 @@ class RuleFailure < ActiveRecord::Base
xml.message(message)
xml.line(line) if line
xml.priority(Sonar::RulePriority.to_s(failure_level))
- xml.createdAt(format_datetime(created_at))
+ xml.createdAt(format_datetime(created_at)) if created_at
xml.rule do
xml.key(rule.key)
xml.name(rule.name)